GPS Device
Loading...
Searching...
No Matches
BUTTON_CFG_ts Struct Reference

Configuration structure for initializing a button instance. More...

#include <button.h>

Collaboration diagram for BUTTON_CFG_ts:

Public Attributes

char name [CONFIG_BUTTON_MAX_NAME_LEN]
GPIO_REGDEF_tsgpio_port
GPIO_PIN_te gpio_pin
BUTTON_PUSHED_TYPE_te pushed_type
uint32_t debounce_limit_ms
uint32_t held_limit_ms

Detailed Description

Configuration structure for initializing a button instance.

This structure is used to configure a button before registering it with the button subsystem using button_init_handle.

Definition at line 75 of file button.h.

Member Data Documentation

◆ name

char BUTTON_CFG_ts::name[CONFIG_BUTTON_MAX_NAME_LEN]

Human-readable name of the button (null-terminated string).

Definition at line 78 of file button.h.

◆ gpio_port

GPIO_REGDEF_ts* BUTTON_CFG_ts::gpio_port

GPIO port where the button is connected.

Definition at line 81 of file button.h.

◆ gpio_pin

GPIO_PIN_te BUTTON_CFG_ts::gpio_pin

GPIO pin number where the button is connected.

Definition at line 84 of file button.h.

◆ pushed_type

BUTTON_PUSHED_TYPE_te BUTTON_CFG_ts::pushed_type

Defines the active level of the button.

  • BUTTON_PUSHED_TYPE_HIGH: button is pressed when pin is HIGH
  • BUTTON_PUSHED_TYPE_LOW: button is pressed when pin is LOW

Definition at line 91 of file button.h.

◆ debounce_limit_ms

uint32_t BUTTON_CFG_ts::debounce_limit_ms

Debounce time in milliseconds.

Definition at line 94 of file button.h.

◆ held_limit_ms

uint32_t BUTTON_CFG_ts::held_limit_ms

Time in milliseconds required to detect a "held" button.

Definition at line 97 of file button.h.


The documentation for this struct was generated from the following file: