|
GPS Device
|
Public functions to interact with the button subsystem. More...

Functions | |
| ERR_te | button_init_subsys (void) |
| Initializes the button subsystem. | |
| ERR_te | button_deinit_subsys (void) |
| Deinitializes the button subsystem. | |
| ERR_te | button_start_subsys (void) |
| Starts the button subsystem. | |
| ERR_te | button_stop_subsys (void) |
| Stops the button subsystem. | |
| ERR_te | button_init_handle (BUTTON_CFG_ts *button_cfg, BUTTON_HANDLE_ts **button_handle) |
| Initializes and registers a button handle. | |
| ERR_te | button_deinit_handle (BUTTON_HANDLE_ts const *button_handle) |
| Deinitializes a button handle. | |
| ERR_te | button_run_handle (BUTTON_HANDLE_ts *button_handle) |
| Executes the state machine for a single button. | |
| ERR_te | button_run_handle_all (void) |
| Runs the state machine for all registered buttons. | |
| ERR_te | button_get_pushed_state (BUTTON_HANDLE_ts const *button_handle, bool *pushed_state_o) |
| Retrieves the pushed (pressed) state of a button. | |
| ERR_te | button_get_held_state (BUTTON_HANDLE_ts const *button_handle, bool *held_state_o) |
| Retrieves the held state of a button. | |
Public functions to interact with the button subsystem.
| ERR_te button_init_subsys | ( | void | ) |
Initializes the button subsystem.
This function initializes the internal state of the button module, sets up required dependencies, and registers subsystem commands.
It must be called before using any other button API functions.
Definition at line 159 of file button.c.


| ERR_te button_deinit_subsys | ( | void | ) |
Deinitializes the button subsystem.
This function resets the internal state of the button subsystem and deregisters previously registered commands.
It must only be called after the subsystem has been initialized and fully stopped.
Definition at line 196 of file button.c.

| ERR_te button_start_subsys | ( | void | ) |
Starts the button subsystem.
Enables runtime processing of button handles. After calling this function, button state updates via button_run_handle() or button_run_handle_all() are allowed.
Definition at line 221 of file button.c.

| ERR_te button_stop_subsys | ( | void | ) |
Stops the button subsystem.
Disables runtime processing of button handles. After calling this function, no button state updates should be performed.
Definition at line 245 of file button.c.
| ERR_te button_init_handle | ( | BUTTON_CFG_ts * | button_cfg, |
| BUTTON_HANDLE_ts ** | button_handle_o ) |
Initializes and registers a button handle.
Configures the GPIO associated with the button and allocates an internal handle from the subsystem pool.
The returned handle must be used for all subsequent operations on the button.
| [in] | button_cfg | Pointer to the button configuration structure. |
| [out] | button_handle_o | Pointer to a handle pointer that will be set to the allocated button instance. |
Definition at line 269 of file button.c.


| ERR_te button_deinit_handle | ( | BUTTON_HANDLE_ts const * | button_handle | ) |
Deinitializes a button handle.
Releases the internal resources associated with the given button handle and marks the slot as available for reuse.
| [in] | button_handle | Pointer to the button handle to deinitialize. |
Definition at line 347 of file button.c.

| ERR_te button_run_handle | ( | BUTTON_HANDLE_ts * | button_handle | ) |
Executes the state machine for a single button.
This function performs debounce handling, press detection, and hold detection for the specified button handle.
It should be called periodically (e.g., in a main loop or scheduler).
| [in,out] | button_handle | Pointer to the button handle to process. |
Executes the state machine for a single button.
Definition at line 402 of file button.c.


| ERR_te button_run_handle_all | ( | void | ) |
Runs the state machine for all registered buttons.
Iterates over all active button handles and processes their state machines.
Runs the state machine for all registered buttons.
Definition at line 502 of file button.c.


| ERR_te button_get_pushed_state | ( | BUTTON_HANDLE_ts const * | button_handle, |
| bool * | pushed_state_o ) |
Retrieves the pushed (pressed) state of a button.
| [in] | button_handle | Pointer to the button handle. |
| [out] | pushed_state_o | Pointer to a boolean that will receive the state. |
Retrieves the pushed (pressed) state of a button.
Definition at line 516 of file button.c.

| ERR_te button_get_held_state | ( | BUTTON_HANDLE_ts const * | button_handle, |
| bool * | held_state_o ) |
Retrieves the held state of a button.
| [in] | button_handle | Pointer to the button handle. |
| [out] | held_state_o | Pointer to a boolean that will receive the state. |
Definition at line 533 of file button.c.
