feat(button): 添加按键模块及初始化按键去皮功能
This commit is contained in:
+10
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user