Przeglądaj źródła

component bt:change the hid profile & bt_profile task

yulong 9 lat temu
rodzic
commit
2fdd9ba930

+ 2 - 2
components/bt/bluedroid/hci/hci_hal_h4.c

@@ -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

+ 1 - 1
components/bt/bluedroid/hci/hci_layer.c

@@ -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);

+ 3 - 3
components/bt/bluedroid/profiles/core/bt_prf_task.c

@@ -85,7 +85,7 @@ void bt_prf_task_start_up(void)
 	 fixed_queue_register_dequeue(bt_profile_msg_queue, bt_profile_msg_ready);
 }
 
-void btu_task_shut_down(void) 
+void bt_prf_task_shut_down(void) 
 {
 	fixed_queue_unregister_dequeue(bt_profile_msg_queue);
 	
@@ -110,7 +110,7 @@ error_exit:;
 void bt_prf_ShutDown(void)
 {
 	
-	btu_task_shut_down();
+	bt_prf_task_shut_down();
 
 	//thread_free(bt_workqueue_thread);
   	vTaskDelete(xProfileTaskHandle);
@@ -118,7 +118,7 @@ void bt_prf_ShutDown(void)
 
 	bt_profile_msg_queue = NULL;
 
-	//  bt_workqueue_thread = NULL;
+	// bt_workqueue_thread = NULL;
   	xProfileTaskHandle = NULL;
  	xProfileQueue = 0;
 }

+ 1 - 1
components/bt/bluedroid/profiles/std/hid_le/hid_le_prf.c

@@ -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;

+ 1 - 1
examples/06_bluedroid_demos/components/bluedroid_demos/app_project/SampleServerProject.c

@@ -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)