Ver Fonte

update: 如果仅使用ble,不使用wlan,那ble就开启自动休眠

Wendal Chen há 2 anos atrás
pai
commit
6ee64ec0cf
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      app/port/luat_nimble_air101.c

+ 3 - 0
app/port/luat_nimble_air101.c

@@ -88,6 +88,9 @@ int luat_nimble_init(uint8_t uart_idx, char* name, int mode) {
         /* As the last thing, process events from default event queue. */
         tls_nimble_start();
         inited = 1;
+        #ifndef LUAT_USE_WLAN
+        tls_bt_ctrl_sleep(true);
+        #endif
     }
     return 0;
 }