|
ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
|
User button (K1) implementation. More...
Go to the source code of this file.
Functions | |
| bool | Button_IsPressed (void) |
| Read the K1 user button state. | |
User button (K1) implementation.
Reads the K1 GPIO via HAL_GPIO_ReadPin and inverts the active-low electrical convention so callers see true when the button is held down.
Under HOST_TEST the function is backed by an in-memory state variable that the unit tests can drive via __button_host_set_pressed().
Definition in file button.c.
| bool Button_IsPressed | ( | void | ) |
Read the K1 user button state.
true if the button is currently held down (pin sampled low after the active-low conversion), false otherwise.Definition at line 28 of file button.c.
References BSP_KEY_PIN, and BSP_KEY_PORT.