]> granicus.if.org Git - esp-idf/commitdiff
commponant bt:change bt_app_main to app_main
authoryulong <yulong@yulong-mac.(none)>
Fri, 14 Oct 2016 08:44:56 +0000 (04:44 -0400)
committeryulong <yulong@yulong-mac.(none)>
Fri, 14 Oct 2016 08:44:56 +0000 (04:44 -0400)
components/bt/bluedroid/profiles/std/include/prf_defs.h
components/esp32/cpu_start.c
examples/06_bluedroid_demos/components/bluedroid_demos/app_core/bt_app_core.c
examples/06_bluedroid_demos/main/demo_main.c

index bf053b31fc0450ea010d85d541d7050978105870..b9c03e3a59827c96777f45251e1c4ebf7610dee5 100644 (file)
@@ -28,7 +28,7 @@
 
 #define WX_AIRSYNC_CFG                 1
 #define BUT_PROFILE_CFG                        0
-#define HIDD_LE_PROFILE_CFG            0
+#define HIDD_LE_PROFILE_CFG            1
 
 /*
  * Type Definition
index 7d875080b43d30cb2a5ede62fa1490da0f3f707d..7b2ccdc609610a977f21657c0be9c45b110ab8f7 100644 (file)
@@ -55,7 +55,7 @@ static bool app_cpu_started = false;
 static void do_global_ctors(void);
 static void main_task(void* args);
 extern void ets_setup_syscalls(void);
-extern void bt_app_main(void);
+extern void app_main(void);
 
 extern int _bss_start;
 extern int _bss_end;
@@ -166,7 +166,7 @@ static void do_global_ctors(void)
 
 static void main_task(void* args)
 {
-    bt_app_main();
+    app_main();
     vTaskDelete(NULL);
 }
 
index 0b2009bf330c21e950f31f4f2c2aad79ada038fa..281698b4a0e13ba82cdc841b48af320dbfd74636 100644 (file)
@@ -256,7 +256,7 @@ static void bt_app_dm_upstreams_evt(UINT16 event, char *p_param)
 
 #if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
         /* Enable local privacy */
-        BTA_DmBleConfigLocalPrivacy(BLE_LOCAL_PRIVACY_ENABLED);
+        //BTA_DmBleConfigLocalPrivacy(BLE_LOCAL_PRIVACY_ENABLED);
         do {
             const controller_t *controller = controller_get_interface();
             char bdstr[18];
@@ -374,7 +374,7 @@ static void bt_app_general_alarm_process(TIMER_LIST_ENT *p_tle)
         /*set connectable,discoverable, pairable and paired only modes of local device*/
         tBTA_DM_DISC disc_mode = BTA_DM_BLE_GENERAL_DISCOVERABLE;
                tBTA_DM_CONN conn_mode = BTA_DM_BLE_CONNECTABLE;
-        //BTA_DmSetVisibility(disc_mode, conn_mode, (UINT8)BTA_DM_NON_PAIRABLE, (UINT8)BTA_DM_CONN_ALL);
+        BTA_DmSetVisibility(disc_mode, conn_mode, (UINT8)BTA_DM_NON_PAIRABLE, (UINT8)BTA_DM_CONN_ALL);
 
        gatts_server_test();
        //gattc_client_test();
index b8b6296296b82b1cfadf6004f24c755027813896..4c9e71a16a43f58988cecfc99d6483770a4cbc3b 100644 (file)
@@ -1,6 +1,10 @@
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include "bt.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
+#include "string.h"
 
 
 extern void bte_main_boot_entry(void *);
@@ -15,8 +19,9 @@ void pingTask(void *pvParameters)
     }
 }
 
-void bt_app_main()
+void app_main()
 {
+    bt_controller_init();
     xTaskCreatePinnedToCore(&pingTask, "pingTask", 2048, NULL, 5, NULL, 0);
     bt_app_task_start_up();
     bte_main_boot_entry(bt_app_core_start);