CubeMon-Vue-Demo-STM32F407VGT6U
|
Data Structures | |
struct | digitalInputAction |
struct | digitalInputDef |
Typedefs | |
typedef enum digitalInputSM | digitalInputSM |
typedef struct digitalInputAction | digitalInputAction |
typedef struct digitalInputDef | digitalInputDef |
Enumerations | |
enum | digitalInputSM { INPUT_SM_WAITING_FOR_CHANGE , INPUT_SM_DEBOUNC , INPUT_SM_CONFIRMED , INPUT_SM_BUTTON_PRESS } |
Functions | |
retStatus | input_get (uint32_t input_name, uint16_t type, int32_t *value) |
Standardized getter function for digital input library. More... | |
retStatus | input_set (uint32_t input_name, uint16_t type, int32_t value) |
Standardized setter function for digital input library. More... | |
retStatus | input_get_init_data (digInputs input_name, digitalInputInitData *digital_input_init_data) |
Return input initialization data. More... | |
retStatus | input_init (digInputs input_name, digitalInputInitData digital_input_init_data) |
Digital input initialization function. More... | |
dioStates | input_logical_state_debounced (digInputs input_name) |
Return the input debounced logical state. More... | |
dioStates | input_state_now (digInputs input_name) |
Return the input state read from HW at the moment the function is called. More... | |
void | input_handle (void) |
Handles digital input logic. Call every 1ms. More... | |
uint8_t | input_get_action (digInputs input_name, digitalInputActions action) |
retStatus | input_ack_action (digInputs input_name, digitalInputActions action) |
Acknowledge digital input action. More... | |
__weak GPIO_PinState | input_get_hw_HAL (digInputs input_name) |
Get HW input state. In case you want to implement it differently (f.e. not using HAL) More... | |
void | __attribute__ ((optimize("-O3"))) |
retStatus input_ack_action | ( | digInputs | input_name, |
digitalInputActions | action | ||
) |
Acknowledge digital input action.
Digital input action digitalInputActions needs to be manually cleared before they are evaluated again.
[in] | input_name | input identification, defined by digInputs |
[out] | action | action to be cleared |
retStatus input_get | ( | uint32_t | input, |
uint16_t | data, | ||
int32_t * | value | ||
) |
Standardized getter function for digital input library.
[in] | input | is the input name defined by digInputs |
[in] | data | data for /p input that can be read out of the module, available data digitalInputDateTypes |
[out] | value | getter output |
uint32_t
and uint16_t
to keep the standard function prototype __weak GPIO_PinState input_get_hw_HAL | ( | digInputs | input_name | ) |
Get HW input state. In case you want to implement it differently (f.e. not using HAL)
[in] | input_name | input identification, defined by digInputs |
GPIO_PinState
(from the HAL library) retStatus input_get_init_data | ( | digInputs | input_name, |
digitalInputInitData * | digital_input_init_data | ||
) |
Return input initialization data.
In case you want to re-initialize some values but keep the rest as it was
[in] | input_name | input identification, defined by digInputs |
[out] | digital_input_init_data | input initialization data digitalInputInitData |
void input_handle | ( | void | ) |
Handles digital input logic. Call every 1ms.
retStatus input_init | ( | digInputs | input_name, |
digitalInputInitData | digital_input_init_data | ||
) |
Digital input initialization function.
[in] | input_name | input identification, defined by digInputs |
[in] | digital_input_init_data | input initialization data digitalInputInitData |
Return the input debounced logical state.
Debounced input logical state is evaluated using the initialization data.
[in] | input_name | input identification, defined by digInputs |
retStatus input_set | ( | uint32_t | input, |
uint16_t | data, | ||
int32_t | value | ||
) |
Standardized setter function for digital input library.
[in] | input | input identification, defined by digInputs |
[in] | data | data for /p input that can be read out of the module, available data digitalInputDateTypes |
[in] | value | value to be set |
You can not set values that are read from HW or calculated from the HW value: INPUT_DAT_CURR and INPUT_DAT_DEBOUNCED
input
and /p data types are changed to uint32_t
and uint16_t
to keep the standard function prototype Return the input state read from HW at the moment the function is called.
[in] | input_name | input identification, defined by digInputs |