Button data types. More...

Data Structures

struct gos_button_config_t
Button configuration. More...

Enumerations

enum gos_button_active_level_t {
GOS_BUTTON_ACTIVE_HIGH = GOS_GPIO_INPUT_PULL_DOWN,
GOS_BUTTON_ACTIVE_LOW = GOS_GPIO_INPUT_PULL_UP
}
Active level of the button. More...
enum gos_button_execution_context_t {
GOS_BUTTON_CONTEXT_DEFAULT ,
GOS_BUTTON_CONTEXT_EVENT_THREAD ,
GOS_BUTTON_CONTEXT_IRQ ,
GOS_BUTTON_CONTEXT_NETWORK_WORKER
}
Context in which the button event should execute. More...
enum gos_button_flag_t {
GOS_BUTTON_FLAG_NONE = 0,
GOS_BUTTON_FLAG_SKIP_REGISTRATION = (1 << 0)
}
Button configuration flags. More...

Detailed Description

Button data types.

Enumeration Type Documentation

gos_button_active_level_t

Active level of the button.

Enumerator
GOS_BUTTON_ACTIVE_HIGH

Button is considered active when it's read as HIGH.

GOS_BUTTON_ACTIVE_LOW

Button is considered active when it's read as LOW.

gos_button_execution_context_t

Context in which the button event should execute.

Enumerator
GOS_BUTTON_CONTEXT_DEFAULT

Execute in the app thread.

GOS_BUTTON_CONTEXT_EVENT_THREAD

Execute in the high priority event thread.

GOS_BUTTON_CONTEXT_IRQ

Execute in the GPIO interrupt context.

GOS_BUTTON_CONTEXT_NETWORK_WORKER

Execute in the network worker context.

gos_button_flag_t

Button configuration flags.

Enumerator
GOS_BUTTON_FLAG_NONE

No flags.

GOS_BUTTON_FLAG_SKIP_REGISTRATION

By default, the button GPIO is registered with the GPIO manager. If this flag is specified then the button GPIO is NOT registered with the GPIO manager. This allows for multiplexing button functionality. NOTE: This is mainly intended for internal use.