|
GPS Device
|
Button module implementation file. More...
#include "button.h"#include "arm_cortex_m4_systick.h"#include "cmd.h"#include "common.h"#include "err.h"#include "stm32f401re_gpio.h"#include "configuration.h"#include "log.h"#include "modules.h"#include "init.h"
Go to the source code of this file.
Classes | |
| struct | button_handle_s |
| Internal structure representing a single button instance. More... | |
| struct | internal_state_s |
| Internal state of the SysTick driver. More... | |
Functions | |
| static ERR_te | button_getpushed_handler (uint32_t argc, char **argv) |
| CLI handler for the "getpushed" command. Reports the debounced pushed state of a button. | |
| static ERR_te | button_getheld_handler (uint32_t argc, char **argv) |
| CLI handler for the "getheld" command. Reports the held state of a button. | |
| static ERR_te | button_cmd_info_handler (uint32_t argc, char **argv) |
| CLI handler for the "info" command. Logs the names of all registered buttons. | |
| 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_o) |
| 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) |
| Runs the state machine for a single button handle. | |
| ERR_te | button_run_handle_all (void) |
| Runs the state machine for all registered button handles. | |
| ERR_te | button_get_pushed_state (BUTTON_HANDLE_ts const *button_handle, bool *pushed_state_o) |
| Retrieves the pushed 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. | |
Variables | |
| static struct internal_state_s | internal_state |
| Singleton instance of the button subsystem internal state. | |
| static CMD_INFO_ts | button_cmds [] |
| Table of CLI commands registered by the button subsystem. | |
| static CMD_CLIENT_INFO_ts | button_cmd_client_info |
| Registration descriptor passed to the command subsystem. | |
Button module implementation file.
Definition in file button.c.
|
static |
|
static |
Table of CLI commands registered by the button subsystem.
Each entry maps a command name string to its handler and a short help string. The table is registered with the command subsystem via button_cmd_client_info during button_init_subsys.
Definition at line 120 of file button.c.
|
static |
Registration descriptor passed to the command subsystem.
Bundles the command table, its size, the subsystem name prefix used on the CLI, and a pointer to the runtime log-level variable so that the command subsystem can adjust verbosity at runtime.
Definition at line 146 of file button.c.