v0.0.29 - Feather firmware: auto-approve sign_event and always return explicit JSON-RPC errors for unhandled/oversized requests
This commit is contained in:
33
firmware/feather_s3_tft/main/buttons.h
Normal file
33
firmware/feather_s3_tft/main/buttons.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
BTN_NONE = 0,
|
||||
BTN_D0,
|
||||
BTN_D1,
|
||||
BTN_D2,
|
||||
} btn_id_t;
|
||||
|
||||
typedef enum {
|
||||
BTN_EVT_NONE = 0,
|
||||
BTN_EVT_PRESS,
|
||||
BTN_EVT_LONG_PRESS,
|
||||
} btn_event_kind_t;
|
||||
|
||||
typedef struct {
|
||||
btn_id_t id;
|
||||
btn_event_kind_t kind;
|
||||
} btn_event_t;
|
||||
|
||||
void buttons_init(void);
|
||||
btn_event_t buttons_wait(uint32_t timeout_ms);
|
||||
btn_event_t buttons_poll(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user