Merge branch 'bugfix/btdm_miscellaneous_modifications' into 'master'

component/bt: some miscellaneous modifications for BLE

See merge request idf/esp-idf!4032
pull/2917/head
Jiang Jiang Jian 2019-01-02 14:04:44 +08:00
commit c4963fc329
7 zmienionych plików z 25 dodań i 8 usunięć

Wyświetl plik

@ -289,6 +289,13 @@ config BTC_TASK_STACK_SIZE
help
This select btc task stack size
config BTU_TASK_STACK_SIZE
int "Bluetooth Bluedroid Host Stack task stack size"
depends on BLUEDROID_ENABLED
default 4096
help
This select btu task stack size
config BLUEDROID_MEM_DEBUG
bool "Bluedroid memory debug"
depends on BLUEDROID_ENABLED

Wyświetl plik

@ -1222,10 +1222,11 @@ void BTA_DmBleSetAdvConfigRaw (UINT8 *p_raw_adv, UINT32 raw_adv_len,
tBTA_DM_API_SET_ADV_CONFIG_RAW *p_msg;
if ((p_msg = (tBTA_DM_API_SET_ADV_CONFIG_RAW *)
osi_malloc(sizeof(tBTA_DM_API_SET_ADV_CONFIG_RAW))) != NULL) {
osi_malloc(sizeof(tBTA_DM_API_SET_ADV_CONFIG_RAW) + raw_adv_len)) != NULL) {
p_msg->hdr.event = BTA_DM_API_BLE_SET_ADV_CONFIG_RAW_EVT;
p_msg->p_adv_data_cback = p_adv_data_cback;
p_msg->p_raw_adv = p_raw_adv;
p_msg->p_raw_adv = (UINT8 *)(p_msg + 1);
memcpy(p_msg->p_raw_adv, p_raw_adv, raw_adv_len);
p_msg->raw_adv_len = raw_adv_len;
bta_sys_sendmsg(p_msg);
@ -1307,10 +1308,11 @@ void BTA_DmBleSetScanRspRaw (UINT8 *p_raw_scan_rsp, UINT32 raw_scan_rsp_len,
tBTA_DM_API_SET_ADV_CONFIG_RAW *p_msg;
if ((p_msg = (tBTA_DM_API_SET_ADV_CONFIG_RAW *)
osi_malloc(sizeof(tBTA_DM_API_SET_ADV_CONFIG_RAW))) != NULL) {
osi_malloc(sizeof(tBTA_DM_API_SET_ADV_CONFIG_RAW) + raw_scan_rsp_len)) != NULL) {
p_msg->hdr.event = BTA_DM_API_BLE_SET_SCAN_RSP_RAW_EVT;
p_msg->p_adv_data_cback = p_scan_rsp_data_cback;
p_msg->p_raw_adv = p_raw_scan_rsp;
p_msg->p_raw_adv = (UINT8 *)(p_msg + 1);
memcpy(p_msg->p_raw_adv, p_raw_scan_rsp, raw_scan_rsp_len);
p_msg->raw_adv_len = raw_scan_rsp_len;
bta_sys_sendmsg(p_msg);

Wyświetl plik

@ -27,4 +27,10 @@
void BTA_GATT_SetLocalMTU(uint16_t mtu)
{
gatt_set_local_mtu(mtu);
}
}
uint16_t BTA_GATT_GetLocalMTU(void)
{
return gatt_get_local_mtu();
}

Wyświetl plik

@ -31,6 +31,8 @@ extern "C"
extern void BTA_GATT_SetLocalMTU(uint16_t mtu);
extern uint16_t BTA_GATT_GetLocalMTU(void);
#ifdef __cplusplus
}
#endif

Wyświetl plik

@ -46,7 +46,7 @@ typedef struct packet_fragmenter_t {
// Release all resources associated with the fragmenter.
void (*cleanup)(void);
// CHeck if Current fragmenter is ongoing
// Check if Current fragmenter is ongoing
BT_HDR *(*fragment_current_packet)(void);
// Fragments |packet| if necessary and hands off everything to the fragmented callback.

Wyświetl plik

@ -33,7 +33,7 @@ typedef enum {
OSI_ALARM_ERR_INVALID_STATE = -3,
} osi_alarm_err_t;
#define ALARM_CBS_NUM 30
#define ALARM_CBS_NUM 50
#define ALARM_ID_BASE 1000
int osi_alarm_create_mux(void);

Wyświetl plik

@ -72,7 +72,7 @@ typedef enum {
#define HCI_H4_QUEUE_LEN 1
#define BTU_TASK_PINNED_TO_CORE (TASK_PINNED_TO_CORE)
#define BTU_TASK_STACK_SIZE (4096 + BT_TASK_EXTRA_STACK_SIZE)
#define BTU_TASK_STACK_SIZE (CONFIG_BTU_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE)
#define BTU_TASK_PRIO (configMAX_PRIORITIES - 5)
#define BTU_TASK_NAME "btuT"
#define BTU_QUEUE_LEN 50