component bt:change the hid profile & bt_profile task
This commit is contained in:
parent
7cb55c2c6c
commit
2fdd9ba930
|
@ -82,7 +82,7 @@ static void hci_hal_env_init(
|
||||||
if (hci_hal_env.rx_q)
|
if (hci_hal_env.rx_q)
|
||||||
fixed_queue_register_dequeue(hci_hal_env.rx_q, event_uart_has_bytes);
|
fixed_queue_register_dequeue(hci_hal_env.rx_q, event_uart_has_bytes);
|
||||||
else
|
else
|
||||||
LOG_ERROR("%s unable to create rx queue.", __func__);
|
LOG_ERROR("%s unable to create rx queue.\n", __func__);
|
||||||
|
|
||||||
return;
|
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);
|
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);
|
xTaskCreate(hci_hal_h4_rx_handler, "HciH4T", 4096+2048, NULL, configMAX_PRIORITIES - 3, &xHciH4TaskHandle);
|
||||||
|
|
||||||
//register vhci host cb
|
//register vhci host cb
|
||||||
|
|
|
@ -111,7 +111,7 @@ int hci_start_up(void) {
|
||||||
if (hci_layer_init_env())
|
if (hci_layer_init_env())
|
||||||
goto error;
|
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);
|
xTaskCreate(hci_host_thread_handler, "HciHostT", (4096+2048), NULL, configMAX_PRIORITIES - 3, &xHciHostTaskHandle);
|
||||||
|
|
||||||
packet_fragmenter->init(&packet_fragmenter_callbacks);
|
packet_fragmenter->init(&packet_fragmenter_callbacks);
|
||||||
|
|
|
@ -85,7 +85,7 @@ void bt_prf_task_start_up(void)
|
||||||
fixed_queue_register_dequeue(bt_profile_msg_queue, bt_profile_msg_ready);
|
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);
|
fixed_queue_unregister_dequeue(bt_profile_msg_queue);
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ error_exit:;
|
||||||
void bt_prf_ShutDown(void)
|
void bt_prf_ShutDown(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
btu_task_shut_down();
|
bt_prf_task_shut_down();
|
||||||
|
|
||||||
//thread_free(bt_workqueue_thread);
|
//thread_free(bt_workqueue_thread);
|
||||||
vTaskDelete(xProfileTaskHandle);
|
vTaskDelete(xProfileTaskHandle);
|
||||||
|
@ -118,7 +118,7 @@ void bt_prf_ShutDown(void)
|
||||||
|
|
||||||
bt_profile_msg_queue = NULL;
|
bt_profile_msg_queue = NULL;
|
||||||
|
|
||||||
// bt_workqueue_thread = NULL;
|
// bt_workqueue_thread = NULL;
|
||||||
xProfileTaskHandle = NULL;
|
xProfileTaskHandle = NULL;
|
||||||
xProfileQueue = 0;
|
xProfileQueue = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -458,7 +458,7 @@ void hidd_le_CreateService(BOOLEAN is_primary)
|
||||||
tBTA_GATTS_IF server_if ;
|
tBTA_GATTS_IF server_if ;
|
||||||
tBT_UUID uuid = {LEN_UUID_16, {ATT_SVC_HID}};
|
tBT_UUID uuid = {LEN_UUID_16, {ATT_SVC_HID}};
|
||||||
//the number of the hid device attributes in the hid service.
|
//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;
|
UINT8 inst = 0x00;
|
||||||
server_if = hidd_le_env.gatt_if;
|
server_if = hidd_le_env.gatt_if;
|
||||||
hidd_le_env.inst_id = inst;
|
hidd_le_env.inst_id = inst;
|
||||||
|
|
|
@ -238,7 +238,7 @@ static void bta_gatts_set_adv_data_cback(tBTA_STATUS call_status)
|
||||||
DIS_SrInit(dis_attr_mask);
|
DIS_SrInit(dis_attr_mask);
|
||||||
*/
|
*/
|
||||||
/*instantiate a battery service*/
|
/*instantiate a battery service*/
|
||||||
bas_register();
|
//bas_register();
|
||||||
/*instantiate the driver for button profile*/
|
/*instantiate the driver for button profile*/
|
||||||
//app_button_init();
|
//app_button_init();
|
||||||
#if (BUT_PROFILE_CFG)
|
#if (BUT_PROFILE_CFG)
|
||||||
|
|
Loading…
Reference in a new issue