feat: 完成弹力魔盒初版固件

This commit is contained in:
2026-08-31 20:15:19 +08:00
parent 026d6d5da7
commit b63a928b92
34 changed files with 1320 additions and 781 deletions
+22
View File
@@ -0,0 +1,22 @@
/******************************************************************************
* @file app_shake_wake.h
* @brief PA3 vibration-switch wake detector.
******************************************************************************/
#ifndef __APP_SHAKE_WAKE_H__
#define __APP_SHAKE_WAKE_H__
#include <stdint.h>
typedef uint8_t (*AppShakeWakeAllowedFn)(void);
typedef void (*AppShakeWakeTriggerFn)(void);
/* The detector owns only PA3 sampling state. Product policy stays in callbacks.
* app_shake_wake_poll() is driven by the shared BOARD_SHAKE_POLL_MS business tick. */
void app_shake_wake_init(AppShakeWakeAllowedFn allowed,
AppShakeWakeTriggerFn trigger);
void app_shake_wake_set_enable(uint8_t enable);
void app_shake_wake_reset(void);
void app_shake_wake_poll(void);
#endif /* __APP_SHAKE_WAKE_H__ */