Add BMA456 tap detection with ESP-NOW notify and host snapshot API.
Slaves forward configured tap kinds to the master; goTool exposes CLI, dashboard, REST, and WebSocket with separate notify vs receive and 2s display cache. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -35,6 +35,18 @@ uint32_t bma456_get_accel_deadzone(void);
|
||||
/** Log accel when any axis moved more than deadzone since last reported sample. */
|
||||
void bma456_report_accel_if_changed(int16_t x, int16_t y, int16_t z);
|
||||
|
||||
/** Tap kinds from BMA456H multitap output. */
|
||||
typedef enum {
|
||||
BMA456_TAP_SINGLE = 1,
|
||||
BMA456_TAP_DOUBLE = 2,
|
||||
BMA456_TAP_TRIPLE = 3,
|
||||
} bma456_tap_kind_t;
|
||||
|
||||
typedef void (*bma456_tap_handler_t)(bma456_tap_kind_t kind, void *ctx);
|
||||
|
||||
/** Optional callback invoked from sensor task on tap interrupt (may be NULL). */
|
||||
void bma456_set_tap_handler(bma456_tap_handler_t handler, void *ctx);
|
||||
|
||||
/** On-demand read of current accel XYZ (raw LSB). Returns ESP_ERR_INVALID_STATE if sensor not ready. */
|
||||
esp_err_t bma456_read_accel(int16_t *x, int16_t *y, int16_t *z);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user