Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Button validation API

Enumerations

enum  { VALIDATION_BUTTON_MODE_TRIGGER = BIT(0) , VALIDATION_BUTTON_MODE_RELEASE = BIT(1) , VALIDATION_BUTTON_MODE_BOTH }

Functions

int infuse_validation_button (const struct gpio_dt_spec *button, uint8_t flags)
 Validate that button transitions can be observed.

Detailed Description

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/validation/button.h>

Enumerator
VALIDATION_BUTTON_MODE_TRIGGER 

Wait for the button to transition to the active state.

VALIDATION_BUTTON_MODE_RELEASE 

Wait for the button to transition to the inactive state.

VALIDATION_BUTTON_MODE_BOTH 

Wait for both trigger and release transitions.

Function Documentation

◆ infuse_validation_button()

int infuse_validation_button ( const struct gpio_dt_spec * button,
uint8_t flags )

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/validation/button.h>

Validate that button transitions can be observed.

Waits up to CONFIG_INFUSE_VALIDATION_BUTTON_ACTION_TIMEOUT seconds for the requested button transitions to occur.

Parameters
buttonButton GPIO specification
flagsTransitions to wait for (VALIDATION_BUTTON_MODE_*)
Return values
0On success
-errnoOn failure