GPIO input handling.
More...
#include "sarmfsw.h"
#include "Logic_in.h"
|
bool | get_GPIO_in (const GPIO_in *const in) |
| Get GPIO_in input value.
|
|
bool | get_GPIO_in_edge (const GPIO_in *const in) |
| Get GPIO_in input edge.
|
|
void | GPIO_in_init (GPIO_in *const in, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState polarity, const uint16_t filter, void(*onSet)(const GPIO_in *const), void(*onReset)(const GPIO_in *const), const bool repeat) |
| Initialize GPIO_in instance.
|
|
void | GPIO_in_handler (GPIO_in *const in) |
| Handles GPIO_in read and treatment.
|
|
GPIO input handling.
- Author
- SMFSW
- Copyright
- MIT (c) 2017-2024, SMFSW
◆ GPIO_in
◆ get_GPIO_in()
bool get_GPIO_in |
( |
const GPIO_in *const | in | ) |
|
|
inline |
Get GPIO_in input value.
- Parameters
-
- Returns
- Input value
◆ get_GPIO_in_edge()
bool get_GPIO_in_edge |
( |
const GPIO_in *const | in | ) |
|
|
inline |
Get GPIO_in input edge.
- Parameters
-
- Returns
- Input edge
◆ GPIO_in_handler()
void GPIO_in_handler |
( |
GPIO_in *const | in | ) |
|
|
inline |
Handles GPIO_in read and treatment.
- Parameters
-
[in,out] | in | - GPIO_in instance to handle |
◆ GPIO_in_init()
void GPIO_in_init |
( |
GPIO_in *const | in, |
|
|
GPIO_TypeDef *const | GPIOx, |
|
|
const uint16_t | GPIO_Pin, |
|
|
const GPIO_PinState | polarity, |
|
|
const uint16_t | filter, |
|
|
void(* | onSet )(const GPIO_in *const), |
|
|
void(* | onReset )(const GPIO_in *const), |
|
|
const bool | repeat ) |
Initialize GPIO_in instance.
- Parameters
-
[in,out] | in | - GPIO_in instance to initialize |
[in] | GPIOx | - port to read from |
[in] | GPIO_Pin | - pin to read from |
[in] | polarity | - set to GPIO_PIN_RESET if active state is GND, GPIO_PIN_SET if Vdd |
[in] | filter | - input filtering time |
[in] | onSet | - Pointer to callback ON function |
[in] | onReset | - Pointer to callback OFF function |
[in] | repeat | - To repeat callback ON as long as input is set |