HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
|
Logic input handling. More...
#include "Logic_in.h"
Functions | |
void | Logic_in_init (Logic_in *const in, GPIO_PinState(*getter)(const Logic_in *const), uint32_t *const addr, const uint32_t pos, const GPIO_PinState polarity, const uint16_t filter, void(*onSet)(const Logic_in *const), void(*onReset)(const Logic_in *const), const bool repeat) |
Initialize Logic_in instance. | |
void | Logic_in_handler (Logic_in *const in) |
Handles Logic_in read and treatment. | |
Logic input handling.
void Logic_in_handler | ( | Logic_in *const | in | ) |
Handles Logic_in read and treatment.
[in,out] | in | - input instance to handle |
void Logic_in_init | ( | Logic_in *const | in, |
GPIO_PinState(* | getter )(const Logic_in *const), | ||
uint32_t *const | addr, | ||
const uint32_t | pos, | ||
const GPIO_PinState | polarity, | ||
const uint16_t | filter, | ||
void(* | onSet )(const Logic_in *const), | ||
void(* | onReset )(const Logic_in *const), | ||
const bool | repeat ) |
Initialize Logic_in instance.
[in,out] | in | - input instance to initialize |
[in] | getter | - Pointer to variable getter function (may be NULL: default behavior for handling RAM variable at address addr) |
[in] | addr | - Variable address to read from (pointer to unsigned 32b, may be NULL if getter handles everything) |
[in] | pos | - monitored bit position (may be unused if getter function is used) |
[in] | polarity | - active state |
[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 |