]> granicus.if.org Git - esp-idf/commitdiff
component bt:change the hid profile & bt_profile task
authoryulong <yulong@yulong-mac.(none)>
Mon, 17 Oct 2016 06:15:36 +0000 (02:15 -0400)
committeryulong <yulong@yulong-mac.(none)>
Mon, 17 Oct 2016 06:15:36 +0000 (02:15 -0400)
components/bt/bluedroid/hci/hci_hal_h4.c
components/bt/bluedroid/hci/hci_layer.c
components/bt/bluedroid/profiles/core/bt_prf_task.c
components/bt/bluedroid/profiles/std/hid_le/hid_le_prf.c
examples/06_bluedroid_demos/components/bluedroid_demos/app_project/SampleServerProject.c

index 19e5a4ba5b38a43e78bd84a12d9b2e271dd1fa40..968e23b1a036eeba35cbee1f642a589fea475378 100755 (executable)
@@ -82,7 +82,7 @@ static void hci_hal_env_init(
   if (hci_hal_env.rx_q)
     fixed_queue_register_dequeue(hci_hal_env.rx_q, event_uart_has_bytes);
   else
-    LOG_ERROR("%s unable to create rx queue.", __func__);
+    LOG_ERROR("%s unable to create rx queue.\n", __func__);
 
   return;
 }
@@ -97,7 +97,7 @@ static bool hal_open(const hci_hal_callbacks_t *upper_callbacks) {
 
   hci_hal_env_init(HCI_HAL_SERIAL_BUFFER_SIZE, SIZE_MAX);
   
-  xHciH4Queue = xQueueCreate(3, sizeof(void *));
+  xHciH4Queue = xQueueCreate(60, sizeof(void *));
   xTaskCreate(hci_hal_h4_rx_handler, "HciH4T", 4096+2048, NULL, configMAX_PRIORITIES - 3, &xHciH4TaskHandle);
 
   //register vhci host cb
index 8aa4ed163779a526f11a05ab5f9a5badd8286026..0fee3ed24e83b6ef7391d0afd2cbcf534398adc7 100755 (executable)
@@ -111,7 +111,7 @@ int hci_start_up(void) {
   if (hci_layer_init_env())
     goto error;
 
-  xHciHostQueue = xQueueCreate(3, sizeof(void *));
+  xHciHostQueue = xQueueCreate(60, sizeof(void *));
   xTaskCreate(hci_host_thread_handler, "HciHostT", (4096+2048), NULL, configMAX_PRIORITIES - 3, &xHciHostTaskHandle);
 
   packet_fragmenter->init(&packet_fragmenter_callbacks);
index bf5ca4e7e7f2c6cf755dcbc8106cc50fe3d4febe..035c8d4eb7702513425f1bb3527b86bb2407f6ce 100644 (file)
@@ -85,7 +85,7 @@ void bt_prf_task_start_up(void)
         fixed_queue_register_dequeue(bt_profile_msg_queue, bt_profile_msg_ready);\r
 }\r
 \r
-void btu_task_shut_down(void) \r
+void bt_prf_task_shut_down(void) \r
 {\r
        fixed_queue_unregister_dequeue(bt_profile_msg_queue);\r
        \r
@@ -110,7 +110,7 @@ error_exit:;
 void bt_prf_ShutDown(void)\r
 {\r
        \r
-       btu_task_shut_down();\r
+       bt_prf_task_shut_down();\r
 \r
        //thread_free(bt_workqueue_thread);\r
        vTaskDelete(xProfileTaskHandle);\r
@@ -118,7 +118,7 @@ void bt_prf_ShutDown(void)
 \r
        bt_profile_msg_queue = NULL;\r
 \r
-       //  bt_workqueue_thread = NULL;\r
+       // bt_workqueue_thread = NULL;\r
        xProfileTaskHandle = NULL;\r
        xProfileQueue = 0;\r
 }\r
index 4b225132b10aca1e162899bfdc144ee98217d0d4..61037ae5ef650800dce6d7e073a9b2cdd02218be 100644 (file)
@@ -458,7 +458,7 @@ void hidd_le_CreateService(BOOLEAN is_primary)
        tBTA_GATTS_IF server_if ;
        tBT_UUID uuid = {LEN_UUID_16, {ATT_SVC_HID}};
        //the number of the hid device attributes in the hid service.
-       UINT16 num_handle = HIDD_LE_IDX_NB;
+       UINT16 num_handle = HIDD_LE_IDX_NB+5;
        UINT8 inst = 0x00;
        server_if = hidd_le_env.gatt_if;
        hidd_le_env.inst_id = inst;
index b9cac08a7118cebe0d0e88f045d0a3ba9f763a87..d5c0264bee3c872ac15d539718b562f61e54df6e 100644 (file)
@@ -238,7 +238,7 @@ static void bta_gatts_set_adv_data_cback(tBTA_STATUS call_status)
     DIS_SrInit(dis_attr_mask);
 */
     /*instantiate a battery service*/
-    bas_register();  
+    //bas_register();  
        /*instantiate the driver for button profile*/
        //app_button_init();
 #if (BUT_PROFILE_CFG)