ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
Loading...
Searching...
No Matches
button.h File Reference
#include <stdbool.h>

Go to the source code of this file.

Functions

bool Button_IsPressed (void)
 Read the K1 user button state.
 

Function Documentation

◆ Button_IsPressed()

bool Button_IsPressed ( void  )

Read the K1 user button state.

Returns
true if the button is currently held down (pin sampled low after the active-low conversion), false otherwise.
Note
Pure read — no debounce, no edge detection. Callers that care about transitions should sample twice with a short delay between reads or maintain their own previous-state flag.
Safe to call from any task context. Does not enter a critical section.

Definition at line 28 of file button.c.

References BSP_KEY_PIN, and BSP_KEY_PORT.