feat(button): 添加按键模块及初始化按键去皮功能

This commit is contained in:
2026-05-11 14:23:05 +08:00
parent dc525ea4e7
commit 353f9aca13
3 changed files with 92 additions and 1 deletions
+10 -1
View File
@@ -8,6 +8,7 @@
*/
#include "ble_transport.h"
#include "button.h"
#include "sensor.h"
#include <zephyr/kernel.h>
@@ -22,7 +23,15 @@ int main(void) {
ble_transport_init();
ble_transport_adv_start();
if (sensor_init()) return 0;
if (button_init()) {
LOG_ERR("Failed to initialize buttons");
return -1;
}
if (sensor_init()) {
LOG_ERR("Failed to initialize sensor");
return -1;
}
k_sleep(K_FOREVER);