/*****************************************************************************
* Function prototypes
****************************************************************************/
-bool bta_ag_hdl_event(BT_HDR* p_msg);
+bool bta_ag_hdl_event(BT_HDR_RIGID* p_msg);
/* API functions */
extern void bta_ag_api_enable(tBTA_AG_CBACK* p_cback);
* @param p_msg event message
* @return True to free p_msg, or False if p_msg is freed within this function
*/
-bool bta_ag_hdl_event(BT_HDR* p_msg) {
+bool bta_ag_hdl_event(BT_HDR_RIGID* p_msg) {
switch (p_msg->event) {
case BTA_AG_RING_TIMEOUT_EVT:
case BTA_AG_SVC_TIMEOUT_EVT:
bool initiator = false;
bool suspend = false;
uint8_t new_role = p_scb->role;
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tHCI_ROLE cur_role;
uint8_t local_tsep = p_scb->seps[p_scb->sep_idx].tsep;
*
******************************************************************************/
static void bta_av_avrc_sdp_cback(UNUSED_ATTR uint16_t status) {
- BT_HDR* p_msg = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_msg = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_msg->event = BTA_AV_SDP_AVRC_DISC_EVT;
*
******************************************************************************/
void bta_av_disable(tBTA_AV_CB* p_cb, UNUSED_ATTR tBTA_AV_DATA* p_data) {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
bool disabling_in_progress = false;
uint16_t xx;
*
******************************************************************************/
void BTA_AvDisable(void) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
bta_sys_deregister(BTA_ID_AV);
p_buf->event = BTA_AV_API_DISABLE_EVT;
*
******************************************************************************/
void BTA_AvDeregister(tBTA_AV_HNDL hndl) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->layer_specific = hndl;
p_buf->event = BTA_AV_API_DEREGISTER_EVT;
void BTA_AvClose(tBTA_AV_HNDL handle) {
LOG_INFO("%s: bta_handle:0x%x", __func__, handle);
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_AV_API_CLOSE_EVT;
p_buf->layer_specific = handle;
void BTA_AvStart(tBTA_AV_HNDL handle) {
LOG_INFO("Starting audio/video stream data transfer bta_handle:%hhu", handle);
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_AV_API_START_EVT;
p_buf->layer_specific = handle;
void BTA_AvOffloadStart(tBTA_AV_HNDL hndl) {
LOG_INFO("%s: bta_handle=0x%x", __func__, hndl);
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_AV_API_OFFLOAD_START_EVT;
p_buf->layer_specific = hndl;
*
******************************************************************************/
void bta_av_ci_src_data_ready(tBTA_AV_CHNL chnl) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->layer_specific = chnl;
p_buf->event = BTA_AV_CI_SRC_DATA_READY_EVT;
/* data type for BTA_AV_API_ENABLE_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_AV_CBACK* p_cback;
tBTA_AV_FEAT features;
} tBTA_AV_API_ENABLE;
/* data type for BTA_AV_API_REGISTER_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
char p_service_name[BTA_SERVICE_NAME_LEN + 1];
uint8_t app_id;
tBTA_AV_SINK_DATA_CBACK* p_app_sink_data_cback;
/* data type for BTA_AV_API_OPEN_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress bd_addr;
bool use_rc;
tBTA_AV_RS_RES switch_res;
/* data type for BTA_AV_API_STOP_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
bool suspend;
bool flush;
bool reconfig_stop; // True if the stream is stopped for reconfiguration
/* data type for BTA_AV_API_DISCONNECT_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress bd_addr;
} tBTA_AV_API_DISCNT;
/* data type for BTA_AV_API_PROTECT_REQ_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t* p_data;
uint16_t len;
} tBTA_AV_API_PROTECT_REQ;
/* data type for BTA_AV_API_PROTECT_RSP_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t* p_data;
uint16_t len;
uint8_t error_code;
/* data type for BTA_AV_API_REMOTE_CMD_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tAVRC_MSG_PASS msg;
uint8_t label;
} tBTA_AV_API_REMOTE_CMD;
/* data type for BTA_AV_API_VENDOR_CMD_EVT and RSP */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tAVRC_MSG_VENDOR msg;
uint8_t label;
} tBTA_AV_API_VENDOR;
/* data type for BTA_AV_API_RC_OPEN_EVT */
-typedef struct { BT_HDR hdr; } tBTA_AV_API_OPEN_RC;
+typedef struct {
+ BT_HDR_RIGID hdr;
+} tBTA_AV_API_OPEN_RC;
/* data type for BTA_AV_API_RC_CLOSE_EVT */
-typedef struct { BT_HDR hdr; } tBTA_AV_API_CLOSE_RC;
+typedef struct {
+ BT_HDR_RIGID hdr;
+} tBTA_AV_API_CLOSE_RC;
/* data type for BTA_AV_API_META_RSP_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
bool is_rsp;
uint8_t label;
tBTA_AV_CODE rsp_code;
/* data type for BTA_AV_API_RECONFIG_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t codec_info[AVDT_CODEC_SIZE]; /* codec configuration */
uint8_t* p_protect_info;
uint8_t num_protect;
/* data type for BTA_AV_CI_SETCONFIG_OK_EVT and BTA_AV_CI_SETCONFIG_FAIL_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_AV_HNDL hndl;
uint8_t err_code;
uint8_t category;
/* data type for all stream events from AVDTP */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
AvdtpSepConfig cfg; /* configuration/capabilities parameters */
tAVDT_CTRL msg; /* AVDTP callback message parameters */
RawAddress bd_addr; /* bd address */
/* data type for BTA_AV_AVRC_MSG_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tAVRC_MSG msg;
uint8_t handle;
uint8_t label;
/* data type for BTA_AV_AVRC_OPEN_EVT, BTA_AV_AVRC_CLOSE_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress peer_addr;
uint8_t handle;
} tBTA_AV_RC_CONN_CHG;
/* data type for BTA_AV_CONN_CHG_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress peer_addr;
bool is_up;
} tBTA_AV_CONN_CHG;
/* data type for BTA_AV_ROLE_CHANGE_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t new_role;
uint8_t hci_status;
} tBTA_AV_ROLE_RES;
/* data type for BTA_AV_SDP_DISC_OK_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
} tBTA_AV_SDP_RES;
/* data type for BTA_AV_API_OFFLOAD_RSP_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_AV_STATUS status;
} tBTA_AV_API_STATUS_RSP;
/* union of all event datatypes */
union tBTA_AV_DATA {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_AV_API_ENABLE api_enable;
tBTA_AV_API_REG api_reg;
tBTA_AV_API_OPEN api_open;
tBTA_AV_DATA* p_data);
extern void bta_av_ssm_execute(tBTA_AV_SCB* p_scb, uint16_t event,
tBTA_AV_DATA* p_data);
-extern bool bta_av_hdl_event(BT_HDR* p_msg);
+extern bool bta_av_hdl_event(BT_HDR_RIGID* p_msg);
extern const char* bta_av_evt_code(uint16_t evt_code);
extern bool bta_av_switch_if_needed(tBTA_AV_SCB* p_scb);
extern bool bta_av_link_role_ok(tBTA_AV_SCB* p_scb, uint8_t bits);
* Returns bool
*
******************************************************************************/
-bool bta_av_hdl_event(BT_HDR* p_msg) {
+bool bta_av_hdl_event(BT_HDR_RIGID* p_msg) {
if (p_msg->event > BTA_AV_LAST_EVT) {
return true; /* to free p_msg */
}
/* data type for BTA_DM_API_SEARCH_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_SERVICE_MASK services;
tBTA_DM_SEARCH_CBACK* p_cback;
} tBTA_DM_API_SEARCH;
/* data type for BTA_DM_API_DISCOVER_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress bd_addr;
tBTA_DM_SEARCH_CBACK* p_cback;
tBT_TRANSPORT transport;
} tBTA_DM_API_PIN_REPLY;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress bd_addr;
tBTM_IO_CAP io_cap;
tBTM_OOB_DATA oob_data;
/* data type for BTA_DM_REMT_NAME_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_DM_SEARCH result;
} tBTA_DM_REM_NAME;
/* data type for tBTA_DM_DISC_RESULT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_DM_SEARCH result;
} tBTA_DM_DISC_RESULT;
/* data type for BTA_DM_INQUIRY_CMPL_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t num;
} tBTA_DM_INQUIRY_CMPL;
/* data type for BTA_DM_SDP_RESULT_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint16_t sdp_result;
} tBTA_DM_SDP_RESULT;
} tBTA_DM_API_ADD_DEVICE;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
bool enable;
} tBTA_DM_API_BLE_FEATURE;
/* union of all data types */
typedef union {
/* GKI event buffer header */
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_DM_API_SEARCH search;
/* DI control block */
extern tBTA_DM_DI_CB bta_dm_di_cb;
-extern bool bta_dm_search_sm_execute(BT_HDR* p_msg);
+extern bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg);
extern void bta_dm_search_sm_disable(void);
extern void bta_dm_enable(tBTA_DM_SEC_CBACK*);
* Returns void
*
******************************************************************************/
-bool bta_dm_search_sm_execute(BT_HDR* p_msg) {
+bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg) {
APPL_TRACE_EVENT("bta_dm_search_sm_execute state:%d, event:0x%x",
bta_dm_search_cb.state, p_msg->event);
p_clreg->dereg_pending = true;
- BT_HDR buf;
+ BT_HDR_RIGID buf;
buf.event = BTA_GATTC_API_CLOSE_EVT;
buf.layer_specific = bta_gattc_cb.clcb[i].bta_conn_id;
bta_gattc_close(&bta_gattc_cb.clcb[i], (tBTA_GATTC_DATA*)&buf);
/** process connect API request */
void bta_gattc_process_api_open(tBTA_GATTC_DATA* p_msg) {
- uint16_t event = ((BT_HDR*)p_msg)->event;
+ uint16_t event = ((BT_HDR_RIGID*)p_msg)->event;
tBTA_GATTC_RCB* p_clreg = bta_gattc_cl_get_regcb(p_msg->api_conn.client_if);
if (!p_clreg) {
void bta_gattc_process_api_open_cancel(tBTA_GATTC_DATA* p_msg) {
CHECK(p_msg != nullptr);
- uint16_t event = ((BT_HDR*)p_msg)->event;
+ uint16_t event = ((BT_HDR_RIGID*)p_msg)->event;
if (!p_msg->api_cancel_conn.is_direct) {
LOG_DEBUG("Cancel GATT client background connection");
*
******************************************************************************/
void BTA_GATTC_Close(uint16_t conn_id) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_GATTC_API_CLOSE_EVT;
p_buf->layer_specific = conn_id;
/* internal strucutre for GATTC register API */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress remote_bda;
tGATT_IF client_if;
bool is_direct;
typedef tBTA_GATTC_API_OPEN tBTA_GATTC_API_CANCEL_OPEN;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tGATT_AUTH_REQ auth_req;
// read by handle data
} tBTA_GATTC_API_READ;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tGATT_AUTH_REQ auth_req;
uint16_t handle;
tGATT_WRITE_TYPE write_type;
} tBTA_GATTC_API_WRITE;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
bool is_execute;
} tBTA_GATTC_API_EXEC;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint16_t cid;
} tBTA_GATTC_API_CONFIRM;
typedef tGATT_CL_COMPLETE tBTA_GATTC_CMPL;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t op_code;
tGATT_STATUS status;
tBTA_GATTC_CMPL* p_cmpl;
} tBTA_GATTC_OP_CMPL;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
bluetooth::Uuid* p_srvc_uuid;
} tBTA_GATTC_API_SEARCH;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tGATT_AUTH_REQ auth_req;
uint8_t num_attr;
uint16_t handles[GATT_MAX_READ_MULTI_HANDLES];
} tBTA_GATTC_API_READ_MULTI;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint16_t mtu;
GATT_CONFIGURE_MTU_OP_CB mtu_cb;
void* mtu_cb_data;
} tBTA_GATTC_API_CFG_MTU;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress remote_bda;
tGATT_IF client_if;
uint8_t role;
} tBTA_GATTC_INT_CONN;
typedef union {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_GATTC_API_OPEN api_conn;
tBTA_GATTC_API_CANCEL_OPEN api_cancel_conn;
tBTA_GATTC_API_READ api_read;
/*****************************************************************************
* Function prototypes
****************************************************************************/
-extern bool bta_gattc_hdl_event(BT_HDR* p_msg);
+extern bool bta_gattc_hdl_event(BT_HDR_RIGID* p_msg);
extern bool bta_gattc_sm_execute(tBTA_GATTC_CLCB* p_clcb, uint16_t event,
tBTA_GATTC_DATA* p_data);
* Returns bool
*
******************************************************************************/
-bool bta_gattc_hdl_event(BT_HDR* p_msg) {
+bool bta_gattc_hdl_event(BT_HDR_RIGID* p_msg) {
tBTA_GATTC_CLCB* p_clcb = NULL;
bool rt = true;
#if (BTA_GATT_DEBUG == TRUE)
return;
}
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_GATTS_API_DISABLE_EVT;
bta_sys_sendmsg(p_buf);
bta_sys_deregister(BTA_ID_GATTS);
*
******************************************************************************/
void BTA_GATTS_DeleteService(uint16_t service_id) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_GATTS_API_DEL_SRVC_EVT;
p_buf->layer_specific = service_id;
*
******************************************************************************/
void BTA_GATTS_StopService(uint16_t service_id) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_GATTS_API_STOP_SRVC_EVT;
p_buf->layer_specific = service_id;
*
******************************************************************************/
void BTA_GATTS_Close(uint16_t conn_id) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_GATTS_API_CLOSE_EVT;
p_buf->layer_specific = conn_id;
/* internal strucutre for GATTC register API */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
bluetooth::Uuid app_uuid;
tBTA_GATTS_CBACK* p_cback;
bool eatt_support;
} tBTA_GATTS_API_REG;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tGATT_IF server_if;
} tBTA_GATTS_INT_START_IF;
typedef tBTA_GATTS_INT_START_IF tBTA_GATTS_API_DEREG;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tGATT_IF server_if;
btgatt_db_element_t* service;
uint16_t count;
} tBTA_GATTS_API_ADD_SERVICE;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint16_t attr_id;
uint16_t len;
bool need_confirm;
} tBTA_GATTS_API_INDICATION;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint32_t trans_id;
tGATT_STATUS status;
tGATTS_RSP* p_rsp;
} tBTA_GATTS_API_RSP;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBT_TRANSPORT transport;
} tBTA_GATTS_API_START;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress remote_bda;
tGATT_IF server_if;
bool is_direct;
typedef tBTA_GATTS_API_OPEN tBTA_GATTS_API_CANCEL_OPEN;
typedef union {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_GATTS_API_REG api_reg;
tBTA_GATTS_API_DEREG api_dereg;
tBTA_GATTS_API_ADD_SERVICE api_add_service;
/*****************************************************************************
* Function prototypes
****************************************************************************/
-extern bool bta_gatts_hdl_event(BT_HDR* p_msg);
+extern bool bta_gatts_hdl_event(BT_HDR_RIGID* p_msg);
extern void bta_gatts_api_disable(tBTA_GATTS_CB* p_cb);
extern void bta_gatts_api_enable(tBTA_GATTS_CB* p_cb, tBTA_GATTS_DATA* p_data);
* Returns void
*
******************************************************************************/
-bool bta_gatts_hdl_event(BT_HDR* p_msg) {
+bool bta_gatts_hdl_event(BT_HDR_RIGID* p_msg) {
tBTA_GATTS_CB* p_cb = &bta_gatts_cb;
switch (p_msg->event) {
bta_sys_deregister(BTA_ID_HD);
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_HD_API_DISABLE_EVT;
bta_sys_sendmsg(p_buf);
}
extern void BTA_HdUnregisterApp(void) {
APPL_TRACE_API("%s", __func__);
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_HD_API_UNREGISTER_APP_EVT;
bta_sys_sendmsg(p_buf);
extern void BTA_HdVirtualCableUnplug(void) {
APPL_TRACE_API("%s", __func__);
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_HD_API_VC_UNPLUG_EVT;
bta_sys_sendmsg(p_buf);
******************************************************************************/
extern void BTA_HdDisconnect(void) {
APPL_TRACE_API("%s", __func__);
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_HD_API_DISCONNECT_EVT;
bta_sys_sendmsg(p_buf);
#define BTA_HD_INVALID_EVT (BTA_HD_API_DISABLE_EVT + 1)
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_HD_CBACK* p_cback;
} tBTA_HD_API_ENABLE;
#define BTA_HD_STATE_REMOVING 0x05
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
char name[BTA_HD_APP_NAME_LEN];
char description[BTA_HD_APP_DESCRIPTION_LEN];
char provider[BTA_HD_APP_PROVIDER_LEN];
#define BTA_HD_REPORT_LEN HID_DEV_MTU_SIZE
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
bool use_intr;
uint8_t type;
uint8_t id;
} tBTA_HD_SEND_REPORT;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress addr;
} tBTA_HD_DEVICE_CTRL;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t error;
} tBTA_HD_REPORT_ERR;
/* union of all event data types */
typedef union {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_HD_API_ENABLE api_enable;
tBTA_HD_REGISTER_APP register_app;
tBTA_HD_SEND_REPORT send_report;
} tBTA_HD_DATA;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress addr;
uint32_t data;
BT_HDR* p_data;
/*****************************************************************************
* Function prototypes
****************************************************************************/
-extern bool bta_hd_hdl_event(BT_HDR* p_msg);
+extern bool bta_hd_hdl_event(BT_HDR_RIGID* p_msg);
extern void bta_hd_api_enable(tBTA_HD_DATA* p_data);
extern void bta_hd_api_disable(void);
* Returns void
*
******************************************************************************/
-bool bta_hd_hdl_event(BT_HDR* p_msg) {
+bool bta_hd_hdl_event(BT_HDR_RIGID* p_msg) {
APPL_TRACE_API("%s: p_msg->event=%d", __func__, p_msg->event);
switch (p_msg->event) {
*
******************************************************************************/
void BTA_HfClientClose(uint16_t handle) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_HF_CLIENT_API_CLOSE_EVT;
p_buf->layer_specific = handle;
*
******************************************************************************/
void BTA_HfClientAudioOpen(uint16_t handle) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_HF_CLIENT_API_AUDIO_OPEN_EVT;
p_buf->layer_specific = handle;
*
******************************************************************************/
void BTA_HfClientAudioClose(uint16_t handle) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_HF_CLIENT_API_AUDIO_CLOSE_EVT;
p_buf->layer_specific = handle;
****************************************************************************/
/* data type for BTA_HF_CLIENT_API_OPEN_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress bd_addr;
uint16_t* handle;
} tBTA_HF_CLIENT_API_OPEN;
/* data type for BTA_HF_CLIENT_DISC_RESULT_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint16_t status;
} tBTA_HF_CLIENT_DISC_RESULT;
/* data type for RFCOMM events */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint16_t port_handle;
} tBTA_HF_CLIENT_RFC;
/* generic purpose data type for other events */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
bool bool_val;
uint8_t uint8_val;
uint32_t uint32_val1;
/* union of all event datatypes */
typedef union {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_HF_CLIENT_API_OPEN api_open;
tBTA_HF_CLIENT_DISC_RESULT disc_result;
tBTA_HF_CLIENT_RFC rfc;
const RawAddress& bd_addr);
extern tBTA_HF_CLIENT_CB* bta_hf_client_find_cb_by_rfc_handle(uint16_t handle);
extern tBTA_HF_CLIENT_CB* bta_hf_client_find_cb_by_sco_handle(uint16_t handle);
-extern bool bta_hf_client_hdl_event(BT_HDR* p_msg);
+extern bool bta_hf_client_hdl_event(BT_HDR_RIGID* p_msg);
extern void bta_hf_client_sm_execute(uint16_t event,
tBTA_HF_CLIENT_DATA* p_data);
extern void bta_hf_client_slc_seq(tBTA_HF_CLIENT_CB* client_cb, bool error);
* Returns bool
*
******************************************************************************/
-bool bta_hf_client_hdl_event(BT_HDR* p_msg) {
+bool bta_hf_client_hdl_event(BT_HDR_RIGID* p_msg) {
APPL_TRACE_DEBUG("%s: %s (0x%x)", __func__,
bta_hf_client_evt_str(p_msg->event), p_msg->event);
bta_hf_client_sm_execute(p_msg->event, (tBTA_HF_CLIENT_DATA*)p_msg);
return;
}
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_HF_CLIENT_SCO_OPEN_EVT;
p_buf->layer_specific = client_cb->handle;
bta_sys_sendmsg(p_buf);
return;
}
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_HF_CLIENT_SCO_CLOSE_EVT;
p_buf->layer_specific = client_cb->handle;
bta_sys_sendmsg(p_buf);
/* data structure used to send a command/data to HID device */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t t_type;
uint8_t param;
uint8_t rpt_id;
/* data type for BTA_HH_API_ENABLE_EVT */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t service_name[BTA_SERVICE_NAME_LEN + 1];
tBTA_HH_CBACK* p_cback;
} tBTA_HH_API_ENABLE;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress bd_addr;
tBTA_HH_PROTO_MODE mode;
} tBTA_HH_API_CONN;
/* internal event data from BTE HID callback */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress addr;
uint32_t data;
BT_HDR* p_data;
} tBTA_HH_CBACK_DATA;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress bda;
uint16_t attr_mask;
uint16_t sub_event;
} tBTA_HH_MAINT_DEV;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint16_t conn_id;
tBTA_GATT_REASON reason; /* disconnect reason code, not useful when connect
event is reported */
} tBTA_HH_LE_CLOSE;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint16_t scan_int;
uint16_t scan_win;
} tBTA_HH_SCPP_UPDATE;
/* union of all event data types */
typedef union {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_HH_API_ENABLE api_enable;
tBTA_HH_API_CONN api_conn;
tBTA_HH_CMD_DATA api_sndcmd;
/*****************************************************************************
* Function prototypes
****************************************************************************/
-extern bool bta_hh_hdl_event(BT_HDR* p_msg);
+extern bool bta_hh_hdl_event(BT_HDR_RIGID* p_msg);
extern void bta_hh_sm_execute(tBTA_HH_DEV_CB* p_cb, uint16_t event,
tBTA_HH_DATA* p_data);
* Returns void
*
******************************************************************************/
-bool bta_hh_hdl_event(BT_HDR* p_msg) {
+bool bta_hh_hdl_event(BT_HDR_RIGID* p_msg) {
uint8_t index = BTA_HH_IDX_INVALID;
tBTA_HH_DEV_CB* p_cb = NULL;
if (p_scb == NULL) return;
if (result == PAN_TX_FLOW_ON) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->layer_specific = handle;
p_buf->event = BTA_PAN_BNEP_FLOW_ENABLE_EVT;
bta_sys_sendmsg(p_buf);
((tBTA_PAN_DATA_PARAMS*)p_new_buf)->forward = forward;
fixed_queue_enqueue(p_scb->data_queue, p_new_buf);
- BT_HDR* p_event = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_event = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_event->layer_specific = handle;
p_event->event = BTA_PAN_RX_FROM_BNEP_READY_EVT;
bta_sys_sendmsg(p_event);
*
******************************************************************************/
void BTA_PanDisable(void) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
bta_sys_deregister(BTA_ID_PAN);
p_buf->event = BTA_PAN_API_DISABLE_EVT;
*
******************************************************************************/
void BTA_PanClose(uint16_t handle) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_PAN_API_CLOSE_EVT;
p_buf->layer_specific = handle;
*
******************************************************************************/
void bta_pan_ci_rx_ready(uint16_t handle) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->layer_specific = handle;
p_buf->event = BTA_PAN_CI_RX_READY_EVT;
/* data type for BTA_PAN_API_ENABLE_EVT */
typedef struct {
- BT_HDR hdr; /* Event header */
+ BT_HDR_RIGID hdr; /* Event header */
tBTA_PAN_CBACK* p_cback; /* PAN callback function */
} tBTA_PAN_API_ENABLE;
/* data type for BTA_PAN_API_REG_ROLE_EVT */
typedef struct {
- BT_HDR hdr; /* Event header */
+ BT_HDR_RIGID hdr; /* Event header */
char user_name[BTA_SERVICE_NAME_LEN + 1]; /* Service name */
char nap_name[BTA_SERVICE_NAME_LEN + 1]; /* Service name */
tBTA_PAN_ROLE role;
/* data type for BTA_PAN_API_OPEN_EVT */
typedef struct {
- BT_HDR hdr; /* Event header */
+ BT_HDR_RIGID hdr; /* Event header */
tBTA_PAN_ROLE local_role; /* local role */
tBTA_PAN_ROLE peer_role; /* peer role */
RawAddress bd_addr; /* peer bdaddr */
/* data type for BTA_PAN_CI_TX_FLOW_EVT */
typedef struct {
- BT_HDR hdr; /* Event header */
+ BT_HDR_RIGID hdr; /* Event header */
bool enable; /* Flow control setting */
} tBTA_PAN_CI_TX_FLOW;
/* data type for BTA_PAN_CONN_OPEN_EVT */
typedef struct {
- BT_HDR hdr; /* Event header */
+ BT_HDR_RIGID hdr; /* Event header */
tPAN_RESULT result;
} tBTA_PAN_CONN;
/* union of all data types */
typedef union {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTA_PAN_API_ENABLE api_enable;
tBTA_PAN_API_SET_ROLE api_set_role;
tBTA_PAN_API_OPEN api_open;
/* pan data param */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
RawAddress src;
RawAddress dst;
uint16_t protocol;
extern void bta_pan_scb_dealloc(tBTA_PAN_SCB* p_scb);
extern uint8_t bta_pan_scb_to_idx(tBTA_PAN_SCB* p_scb);
extern tBTA_PAN_SCB* bta_pan_scb_by_handle(uint16_t handle);
-extern bool bta_pan_hdl_event(BT_HDR* p_msg);
+extern bool bta_pan_hdl_event(BT_HDR_RIGID* p_msg);
/* action functions */
extern void bta_pan_enable(tBTA_PAN_DATA* p_data);
* Returns void
*
******************************************************************************/
-bool bta_pan_hdl_event(BT_HDR* p_msg) {
+bool bta_pan_hdl_event(BT_HDR_RIGID* p_msg) {
tBTA_PAN_SCB* p_scb;
bool freebuf = true;
typedef bool(tBTA_SYS_VS_EVT_HDLR)(uint16_t evt, void* p);
/* event handler function type */
-typedef bool(tBTA_SYS_EVT_HDLR)(BT_HDR* p_msg);
+typedef bool(tBTA_SYS_EVT_HDLR)(BT_HDR_RIGID* p_msg);
+static_assert(
+ sizeof(BT_HDR) == sizeof(BT_HDR_RIGID),
+ "Rigid replacement should be same size struct with flexible member");
/* disable function type */
typedef void(tBTA_SYS_DISABLE)(void);
* Returns void
*
******************************************************************************/
-static void bta_sys_event(BT_HDR* p_msg) {
+static void bta_sys_event(BT_HDR_RIGID* p_msg) {
uint8_t id;
bool freebuf = true;
******************************************************************************/
void bta_sys_sendmsg(void* p_msg) {
if (do_in_main_thread(
- FROM_HERE, base::Bind(&bta_sys_event, static_cast<BT_HDR*>(p_msg))) !=
+ FROM_HERE,
+ base::Bind(&bta_sys_event, static_cast<BT_HDR_RIGID*>(p_msg))) !=
BT_STATUS_SUCCESS) {
LOG(ERROR) << __func__ << ": do_in_main_thread failed";
}
void bta_sys_sendmsg_delayed(void* p_msg, const base::TimeDelta& delay) {
if (do_in_main_thread_delayed(
- FROM_HERE, base::Bind(&bta_sys_event, static_cast<BT_HDR*>(p_msg)),
+ FROM_HERE,
+ base::Bind(&bta_sys_event, static_cast<BT_HDR_RIGID*>(p_msg)),
delay) != BT_STATUS_SUCCESS) {
LOG(ERROR) << __func__ << ": do_in_main_thread_delayed failed";
}
******************************************************************************/
void bta_sys_start_timer(alarm_t* alarm, uint64_t interval_ms, uint16_t event,
uint16_t layer_specific) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = event;
p_buf->layer_specific = layer_specific;
void acl_disconnect_from_handle(uint16_t handle, tHCI_STATUS reason) {
mock_function_count_map[__func__]++;
}
-void acl_link_segments_xmitted(BT_HDR* p_msg) {
+void acl_link_segments_xmitted(BT_HDR_RIGID* p_msg) {
mock_function_count_map[__func__]++;
}
void acl_packets_completed(uint16_t handle, uint16_t credits) {
void acl_process_num_completed_pkts(uint8_t* p, uint8_t evt_len) {
mock_function_count_map[__func__]++;
}
-void acl_rcv_acl_data(BT_HDR* p_msg) { mock_function_count_map[__func__]++; }
+void acl_rcv_acl_data(BT_HDR_RIGID* p_msg) {
+ mock_function_count_map[__func__]++;
+}
void acl_reject_connection_request(const RawAddress& bd_addr, uint8_t reason) {
mock_function_count_map[__func__]++;
}
uint16_t rx_pkt_len, uint16_t tx_pkt_len) {
mock_function_count_map[__func__]++;
}
-void btm_route_sco_data(BT_HDR* p_msg) { mock_function_count_map[__func__]++; }
+void btm_route_sco_data(BT_HDR_RIGID* p_msg) {
+ mock_function_count_map[__func__]++;
+}
void btm_sco_acl_removed(const RawAddress* bda) {
mock_function_count_map[__func__]++;
}
/* this type handles all btif context switches between BTU and HAL */
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tBTIF_CBACK* p_cb; /* context switch callback */
/* parameters passed to callback */
};
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
uint8_t codec_info[AVDT_CODEC_SIZE];
} tBTIF_MEDIA_SINK_DECODER_UPDATE;
typedef struct {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
btif_a2dp_sink_focus_state_t focus_state;
} tBTIF_MEDIA_SINK_FOCUS_UPDATE;
static void btif_a2dp_sink_end_session_delayed();
static void btif_a2dp_sink_shutdown_delayed();
static void btif_a2dp_sink_cleanup_delayed();
-static void btif_a2dp_sink_command_ready(BT_HDR* p_msg);
+static void btif_a2dp_sink_command_ready(BT_HDR_RIGID* p_msg);
static void btif_a2dp_sink_audio_handle_stop_decoding();
static void btif_decode_alarm_cb(void* context);
static void btif_a2dp_sink_audio_handle_start_decoding();
return btif_a2dp_sink_cb.channel_count;
}
-static void btif_a2dp_sink_command_ready(BT_HDR* p_msg) {
+static void btif_a2dp_sink_command_ready(BT_HDR_RIGID* p_msg) {
LOG_VERBOSE("%s: event %d %s", __func__, p_msg->event,
dump_media_event(p_msg->event));
p_buf->hdr.event = BTIF_MEDIA_SINK_DECODER_UPDATE;
btif_a2dp_sink_cb.worker_thread.DoInThread(
- FROM_HERE, base::BindOnce(btif_a2dp_sink_command_ready, (BT_HDR*)p_buf));
+ FROM_HERE,
+ base::BindOnce(btif_a2dp_sink_command_ready, (BT_HDR_RIGID*)p_buf));
}
void btif_a2dp_sink_on_idle() {
LOG_INFO("%s", __func__);
- BT_HDR* p_buf = reinterpret_cast<BT_HDR*>(osi_malloc(sizeof(BT_HDR)));
+ BT_HDR_RIGID* p_buf =
+ reinterpret_cast<BT_HDR_RIGID*>(osi_malloc(sizeof(BT_HDR_RIGID)));
p_buf->event = BTIF_MEDIA_SINK_SUSPEND;
btif_a2dp_sink_cb.worker_thread.DoInThread(
FROM_HERE, base::BindOnce(btif_a2dp_sink_command_ready, p_buf));
void btif_a2dp_sink_on_stopped(UNUSED_ATTR tBTA_AV_SUSPEND* p_av_suspend) {
LOG_INFO("%s", __func__);
- BT_HDR* p_buf = reinterpret_cast<BT_HDR*>(osi_malloc(sizeof(BT_HDR)));
+ BT_HDR_RIGID* p_buf =
+ reinterpret_cast<BT_HDR_RIGID*>(osi_malloc(sizeof(BT_HDR_RIGID)));
p_buf->event = BTIF_MEDIA_SINK_SUSPEND;
btif_a2dp_sink_cb.worker_thread.DoInThread(
FROM_HERE, base::BindOnce(btif_a2dp_sink_command_ready, p_buf));
void btif_a2dp_sink_on_suspended(UNUSED_ATTR tBTA_AV_SUSPEND* p_av_suspend) {
LOG_INFO("%s", __func__);
- BT_HDR* p_buf = reinterpret_cast<BT_HDR*>(osi_malloc(sizeof(BT_HDR)));
+ BT_HDR_RIGID* p_buf =
+ reinterpret_cast<BT_HDR_RIGID*>(osi_malloc(sizeof(BT_HDR_RIGID)));
p_buf->event = BTIF_MEDIA_SINK_SUSPEND;
btif_a2dp_sink_cb.worker_thread.DoInThread(
FROM_HERE, base::BindOnce(btif_a2dp_sink_command_ready, p_buf));
bool btif_a2dp_sink_on_start() {
LOG_INFO("%s", __func__);
- BT_HDR* p_buf = reinterpret_cast<BT_HDR*>(osi_malloc(sizeof(BT_HDR)));
+ BT_HDR_RIGID* p_buf =
+ reinterpret_cast<BT_HDR_RIGID*>(osi_malloc(sizeof(BT_HDR_RIGID)));
p_buf->event = BTIF_MEDIA_SINK_START;
btif_a2dp_sink_cb.worker_thread.DoInThread(
FROM_HERE, base::BindOnce(btif_a2dp_sink_command_ready, p_buf));
return;
}
- BT_HDR* p_buf = reinterpret_cast<BT_HDR*>(osi_malloc(sizeof(BT_HDR)));
+ BT_HDR_RIGID* p_buf =
+ reinterpret_cast<BT_HDR_RIGID*>(osi_malloc(sizeof(BT_HDR_RIGID)));
p_buf->event = BTIF_MEDIA_SINK_AUDIO_RX_FLUSH;
btif_a2dp_sink_cb.worker_thread.DoInThread(
FROM_HERE, base::BindOnce(btif_a2dp_sink_command_ready, p_buf));
p_buf->focus_state = state;
p_buf->hdr.event = BTIF_MEDIA_SINK_SET_FOCUS_STATE;
btif_a2dp_sink_cb.worker_thread.DoInThread(
- FROM_HERE, base::BindOnce(btif_a2dp_sink_command_ready, (BT_HDR*)p_buf));
+ FROM_HERE,
+ base::BindOnce(btif_a2dp_sink_command_ready, (BT_HDR_RIGID*)p_buf));
}
static void btif_a2dp_sink_set_focus_state_event(
static void btif_a2dp_sink_clear_track_event_req() {
LOG_INFO("%s", __func__);
- BT_HDR* p_buf = reinterpret_cast<BT_HDR*>(osi_malloc(sizeof(BT_HDR)));
+ BT_HDR_RIGID* p_buf =
+ reinterpret_cast<BT_HDR_RIGID*>(osi_malloc(sizeof(BT_HDR_RIGID)));
p_buf->event = BTIF_MEDIA_SINK_CLEAR_TRACK;
btif_a2dp_sink_cb.worker_thread.DoInThread(
#define BTE_HCISU_USERIAL_OK 1
typedef void(tUSERIAL_MSG_CBACK)(int status);
typedef struct tHCISU_USERIAL_MSG_tag {
- BT_HDR hdr;
+ BT_HDR_RIGID hdr;
tUSERIAL_MSG_CBACK* p_cback;
uint8_t port; /* port number */
uint8_t op;