/device/soc/esp/esp32/components/bt/host/bluedroid/bta/gatt/ |
D | bta_gatts_api.c | 58 BT_HDR *p_buf; in BTA_GATTS_Disable() local 65 if ((p_buf = (BT_HDR *) osi_malloc(sizeof(BT_HDR))) != NULL) { in BTA_GATTS_Disable() 66 p_buf->event = BTA_GATTS_API_DISABLE_EVT; in BTA_GATTS_Disable() 67 bta_sys_sendmsg(p_buf); in BTA_GATTS_Disable() 88 tBTA_GATTS_API_REG *p_buf; in BTA_GATTS_AppRegister() local 95 if ((p_buf = (tBTA_GATTS_API_REG *) osi_malloc(sizeof(tBTA_GATTS_API_REG))) != NULL) { in BTA_GATTS_AppRegister() 96 p_buf->hdr.event = BTA_GATTS_API_REG_EVT; in BTA_GATTS_AppRegister() 99 memcpy(&p_buf->app_uuid, p_app_uuid, sizeof(tBT_UUID)); in BTA_GATTS_AppRegister() 101 p_buf->p_cback = p_cback; in BTA_GATTS_AppRegister() 103 bta_sys_sendmsg(p_buf); in BTA_GATTS_AppRegister() [all …]
|
D | bta_gattc_api.c | 58 BT_HDR *p_buf; in BTA_GATTC_Disable() local 64 if ((p_buf = (BT_HDR *) osi_malloc(sizeof(BT_HDR))) != NULL) { in BTA_GATTC_Disable() 65 p_buf->event = BTA_GATTC_API_DISABLE_EVT; in BTA_GATTC_Disable() 66 bta_sys_sendmsg(p_buf); in BTA_GATTC_Disable() 87 tBTA_GATTC_API_REG *p_buf; in BTA_GATTC_AppRegister() local 93 if ((p_buf = (tBTA_GATTC_API_REG *) osi_malloc(sizeof(tBTA_GATTC_API_REG))) != NULL) { in BTA_GATTC_AppRegister() 94 p_buf->hdr.event = BTA_GATTC_API_REG_EVT; in BTA_GATTC_AppRegister() 96 memcpy(&p_buf->app_uuid, p_app_uuid, sizeof(tBT_UUID)); in BTA_GATTC_AppRegister() 98 p_buf->p_cback = p_client_cb; in BTA_GATTC_AppRegister() 100 bta_sys_sendmsg(p_buf); in BTA_GATTC_AppRegister() [all …]
|
/device/soc/esp/esp32/components/bt/host/bluedroid/bta/hh/ |
D | bta_hh_api.c | 64 tBTA_HH_API_ENABLE *p_buf; in BTA_HhEnable() local 70 p_buf = (tBTA_HH_API_ENABLE *)osi_malloc((UINT16)sizeof(tBTA_HH_API_ENABLE)); in BTA_HhEnable() 72 if (p_buf != NULL) { in BTA_HhEnable() 73 memset(p_buf, 0, sizeof(tBTA_HH_API_ENABLE)); in BTA_HhEnable() 75 p_buf->hdr.event = BTA_HH_API_ENABLE_EVT; in BTA_HhEnable() 76 p_buf->p_cback = p_cback; in BTA_HhEnable() 77 p_buf->sec_mask = sec_mask; in BTA_HhEnable() 79 bta_sys_sendmsg(p_buf); in BTA_HhEnable() 95 BT_HDR *p_buf; in BTA_HhDisable() local 98 if ((p_buf = (BT_HDR *)osi_malloc(sizeof(BT_HDR))) != NULL) { in BTA_HhDisable() [all …]
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/rfcomm/ |
D | rfc_ts_frames.c | 46 BT_HDR *p_buf; in rfc_send_sabme() local 50 if ((p_buf = (BT_HDR *)osi_malloc(RFCOMM_CMD_BUF_SIZE)) == NULL) { in rfc_send_sabme() 54 p_buf->offset = L2CAP_MIN_OFFSET; in rfc_send_sabme() 55 p_data = (UINT8 *)(p_buf + 1) + L2CAP_MIN_OFFSET; in rfc_send_sabme() 62 *p_data = RFCOMM_SABME_FCS ((UINT8 *)(p_buf + 1) + L2CAP_MIN_OFFSET, cr, dlci); in rfc_send_sabme() 64 p_buf->len = 4; in rfc_send_sabme() 66 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_sabme() 79 BT_HDR *p_buf; in rfc_send_ua() local 83 if ((p_buf = (BT_HDR *)osi_malloc(RFCOMM_CMD_BUF_SIZE)) == NULL) { in rfc_send_ua() 87 p_buf->offset = L2CAP_MIN_OFFSET; in rfc_send_ua() [all …]
|
D | port_api.c | 1150 BT_HDR *p_buf; in PORT_Purge() local 1172 while ((p_buf = (BT_HDR *)fixed_queue_dequeue(p_port->rx.queue, 0)) != NULL) { in PORT_Purge() 1173 osi_free (p_buf); in PORT_Purge() 1189 while ((p_buf = (BT_HDR *)fixed_queue_dequeue(p_port->tx.queue, 0)) != NULL) { in PORT_Purge() 1190 osi_free (p_buf); in PORT_Purge() 1228 BT_HDR *p_buf; in PORT_ReadData() local 1259 p_buf = (BT_HDR *)fixed_queue_try_peek_first(p_port->rx.queue); in PORT_ReadData() 1260 if (p_buf == NULL){ in PORT_ReadData() 1264 if (p_buf->len > max_len) { in PORT_ReadData() 1265 memcpy (p_data, (UINT8 *)(p_buf + 1) + p_buf->offset, max_len); in PORT_ReadData() [all …]
|
/device/board/unionman/unionpi_tiger/kernel/drivers/isp/drivers/v4l2_dev/src/fw_lib/ |
D | acamera_event_queue.c | 27 static void acamera_event_queue_reset( acamera_loop_buf_ptr_t p_buf ) in acamera_event_queue_reset() argument 29 p_buf->head = p_buf->tail = 0; in acamera_event_queue_reset() 36 acamera_loop_buf_ptr_t p_buf = &( p_queue->buf ); in acamera_event_queue_push() local 41 if ( ( p_buf->head < 0 ) || in acamera_event_queue_push() 42 ( p_buf->head >= p_buf->data_buf_size ) || in acamera_event_queue_push() 43 ( p_buf->tail < 0 ) || in acamera_event_queue_push() 44 ( p_buf->tail >= p_buf->data_buf_size ) ) { in acamera_event_queue_push() 52 int pos = acamera_loop_buffer_write_u8( p_buf, 0, (uint8_t)event ); in acamera_event_queue_push() 53 if ( pos != p_buf->tail ) { in acamera_event_queue_push() 54 p_buf->head = pos; in acamera_event_queue_push() [all …]
|
D | acamera_loop_buf.c | 22 void acamera_loop_buffer_init( acamera_loop_buf_ptr_t p_buf, uint8_t *p_data_buf, int data_buf_size… in acamera_loop_buffer_init() argument 24 p_buf->head = p_buf->tail = 0; in acamera_loop_buffer_init() 25 p_buf->p_data_buf = p_data_buf; in acamera_loop_buffer_init() 26 p_buf->data_buf_size = data_buf_size; in acamera_loop_buffer_init() 29 uint8_t acamera_loop_buffer_read_u8( acamera_loop_buf_ptr_t p_buf, int pos ) in acamera_loop_buffer_read_u8() argument 31 pos += p_buf->tail; in acamera_loop_buffer_read_u8() 32 if ( pos >= p_buf->data_buf_size ) { in acamera_loop_buffer_read_u8() 33 pos -= p_buf->data_buf_size; in acamera_loop_buffer_read_u8() 35 return p_buf->p_data_buf[pos]; in acamera_loop_buffer_read_u8() 38 int acamera_loop_buffer_write_u8( acamera_loop_buf_ptr_t p_buf, int pos, uint8_t sample ) in acamera_loop_buffer_write_u8() argument [all …]
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/gatt/ |
D | att_protocol.c | 49 BT_HDR *p_buf = NULL; in attp_build_mtu_cmd() local 52 if ((p_buf = (BT_HDR *)osi_malloc(sizeof(BT_HDR) + GATT_HDR_SIZE + L2CAP_MIN_OFFSET)) != NULL) { in attp_build_mtu_cmd() 53 p = (UINT8 *)(p_buf + 1) + L2CAP_MIN_OFFSET; in attp_build_mtu_cmd() 58 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_mtu_cmd() 59 p_buf->len = GATT_HDR_SIZE; /* opcode + 2 bytes mtu */ in attp_build_mtu_cmd() 61 return p_buf; in attp_build_mtu_cmd() 74 BT_HDR *p_buf = NULL; in attp_build_exec_write_cmd() local 77 if ((p_buf = (BT_HDR *)osi_malloc(GATT_DATA_BUF_SIZE)) != NULL) { in attp_build_exec_write_cmd() 78 p = (UINT8 *)(p_buf + 1) + L2CAP_MIN_OFFSET; in attp_build_exec_write_cmd() 80 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_exec_write_cmd() [all …]
|
D | gatt_auth.c | 100 void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf) in gatt_verify_signature() argument 106 UINT8 *p, *p_orig = (UINT8 *)(p_buf + 1) + p_buf->offset; in gatt_verify_signature() 109 if (p_buf->len < GATT_AUTH_SIGN_LEN + 4) { in gatt_verify_signature() 111 __func__, p_buf->len, GATT_AUTH_SIGN_LEN + 4); in gatt_verify_signature() 114 cmd_len = p_buf->len - GATT_AUTH_SIGN_LEN + 4; in gatt_verify_signature() 121 gatt_server_handle_client_req (p_tcb, op_code, (UINT16)(p_buf->len - 1), p_orig); in gatt_verify_signature() 178 tGATT_PENDING_ENC_CLCB *p_buf = in gatt_enc_cmpl_cback() local 180 if (p_buf != NULL) { in gatt_enc_cmpl_cback() 192 gatt_sec_check_complete(status , p_buf->p_clcb, p_tcb->sec_act); in gatt_enc_cmpl_cback() 193 osi_free(p_buf); in gatt_enc_cmpl_cback() [all …]
|
/device/board/kaihong/khdvk_3566b/kernel/bluetooth/src/ |
D | hardware.c | 474 static ssize_t hw_config_set_bdaddr(HC_BT_HDR *p_buf) in hw_config_set_bdaddr() argument 477 uint8_t *p = (uint8_t *)(p_buf + 1); in hw_config_set_bdaddr() 489 p_buf->len = HCI_CMD_PREAMBLE_SIZE + BD_ADDR_LEN; in hw_config_set_bdaddr() 491 retval = bt_vendor_cbacks->xmit_cb(HCI_VSC_WRITE_BD_ADDR, p_buf); in hw_config_set_bdaddr() 506 static ssize_t hw_config_read_bdaddr(HC_BT_HDR *p_buf) in hw_config_read_bdaddr() argument 509 uint8_t *p = (uint8_t *)(p_buf + 1); in hw_config_read_bdaddr() 514 p_buf->len = HCI_CMD_PREAMBLE_SIZE; in hw_config_read_bdaddr() 517 retval = bt_vendor_cbacks->xmit_cb(HCI_READ_LOCAL_BDADDR, p_buf); in hw_config_read_bdaddr() 599 ssize_t hw_config_cback_read_local_name(HC_BT_HDR *p_buf, uint16_t opcode) in hw_config_cback_read_local_name() argument 601 uint8_t *p = (uint8_t *)(p_buf + 1); in hw_config_cback_read_local_name() [all …]
|
/device/board/osware/imx8mm/drivers/bluetooth/source/src/ |
D | hardware.c | 478 static ssize_t hw_config_set_bdaddr(HC_BT_HDR *p_buf) in hw_config_set_bdaddr() argument 481 uint8_t *p = (uint8_t *)(p_buf + 1); in hw_config_set_bdaddr() 493 p_buf->len = HCI_CMD_PREAMBLE_SIZE + BD_ADDR_LEN; in hw_config_set_bdaddr() 496 retval = bt_vendor_cbacks->xmit_cb(HCI_VSC_WRITE_BD_ADDR, p_buf); in hw_config_set_bdaddr() 511 static ssize_t hw_config_read_bdaddr(HC_BT_HDR *p_buf) in hw_config_read_bdaddr() argument 514 uint8_t *p = (uint8_t *)(p_buf + 1); in hw_config_read_bdaddr() 519 p_buf->len = HCI_CMD_PREAMBLE_SIZE; in hw_config_read_bdaddr() 522 retval = bt_vendor_cbacks->xmit_cb(HCI_READ_LOCAL_BDADDR, p_buf); in hw_config_read_bdaddr() 618 HC_BT_HDR *p_buf = NULL; in hw_config_cback() local 632 p_buf = (HC_BT_HDR *)bt_vendor_cbacks->alloc(BT_HC_HDR_SIZE + HCI_CMD_MAX_LEN); in hw_config_cback() [all …]
|
/device/board/hisilicon/hispark_phoenix/peripherals/bluetooth/rtkbt/code/libbt-vendor/src/ |
D | rtk_heartbeat.c | 143 unsigned char p_buf[100]; in rtkbt_heartbeat_send_hw_error() local 145 p_buf[0] = HCIT_TYPE_EVENT; // event in rtkbt_heartbeat_send_hw_error() 146 p_buf[1] = HCI_VSE_SUBCODE_DEBUG_INFO_SUB_EVT; // firmwre event log in rtkbt_heartbeat_send_hw_error() 147 p_buf[3] = 0x01; // host log opcode in rtkbt_heartbeat_send_hw_error() 148 length = sprintf((char *)&p_buf[4], "host stack: heartbeat hw error: %d:%d:%d:%d", in rtkbt_heartbeat_send_hw_error() 150 p_buf[2] = length + 2; // len in rtkbt_heartbeat_send_hw_error() 152 userial_recv_rawdata_hook(p_buf, length); in rtkbt_heartbeat_send_hw_error() 155 p_buf[0] = HCIT_TYPE_EVENT; // event in rtkbt_heartbeat_send_hw_error() 156 p_buf[1] = HCI_HARDWARE_ERROR_EVT; // hardware error in rtkbt_heartbeat_send_hw_error() 157 p_buf[2] = 0x01; // len in rtkbt_heartbeat_send_hw_error() [all …]
|
D | hardware.c | 183 uint8_t rtk_get_fw_project_id(uint8_t *p_buf) in rtk_get_fw_project_id() argument 191 opcode = *p_buf; in rtk_get_fw_project_id() 192 len = *(p_buf - 1); in rtk_get_fw_project_id() 197 data = *(p_buf - 2); in rtk_get_fw_project_id() 207 p_buf -= len + 2; in rtk_get_fw_project_id() 208 } while (*p_buf != 0xFF); in rtk_get_fw_project_id() 341 HC_BT_HDR *p_buf = NULL; in hw_epilog_process() local 350 p_buf = (HC_BT_HDR *)bt_vendor_cbacks->alloc(BT_HC_HDR_SIZE + in hw_epilog_process() 354 if (p_buf) in hw_epilog_process() 356 p_buf->event = MSG_STACK_TO_HC_HCI_CMD; in hw_epilog_process() [all …]
|
/device/board/unionman/unionpi_tiger/hardware/bt/src/ |
D | rtk_heartbeat.c | 137 unsigned char p_buf[100]; in rtkbt_heartbeat_send_hw_error() local 142 p_buf[0] = HCIT_TYPE_EVENT; // event in rtkbt_heartbeat_send_hw_error() 143 p_buf[1] = HCI_VSE_SUBCODE_DEBUG_INFO_SUB_EVT; // firmwre event log in rtkbt_heartbeat_send_hw_error() 144 p_buf[P_BUF_3] = 0x01; // host log opcode in rtkbt_heartbeat_send_hw_error() 145 …length = sprintf_s((char *)&p_buf[P_BUF_4], sizeof(p_buf), "host stack: heartbeat hw error: %d:%d:… in rtkbt_heartbeat_send_hw_error() 149 p_buf[P_BUF_2] = length + P_BUF_2; // len in rtkbt_heartbeat_send_hw_error() 151 userial_recv_rawdata_hook(p_buf, length); in rtkbt_heartbeat_send_hw_error() 154 p_buf[0] = HCIT_TYPE_EVENT; // event in rtkbt_heartbeat_send_hw_error() 155 p_buf[1] = HCI_HARDWARE_ERROR_EVT; // hardware error in rtkbt_heartbeat_send_hw_error() 156 p_buf[P_BUF_2] = 0x01; // len in rtkbt_heartbeat_send_hw_error() [all …]
|
D | hardware.c | 152 uint8_t rtk_get_fw_project_id(uint8_t *p_buf) in rtk_get_fw_project_id() argument 159 opcode = *p_buf; in rtk_get_fw_project_id() 160 len = *(p_buf - 1); in rtk_get_fw_project_id() 163 data = *(p_buf - 2L); in rtk_get_fw_project_id() 170 p_buf -= len + 2L; in rtk_get_fw_project_id() 171 } while (*p_buf != 0xFF); in rtk_get_fw_project_id() 294 HC_BT_HDR *p_buf = NULL; in hw_epilog_process() local 302 p_buf = (HC_BT_HDR *)bt_vendor_cbacks->alloc(BT_HC_HDR_SIZE + HCI_CMD_PREAMBLE_SIZE); in hw_epilog_process() 305 if (p_buf) { in hw_epilog_process() 306 p_buf->event = MSG_STACK_TO_HC_HCI_CMD; in hw_epilog_process() [all …]
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/l2cap/ |
D | l2c_fcr.c | 91 static void process_s_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word); 92 static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, BOOLEAN delay_ack… 94 static void prepare_I_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, BOOLEAN is_retransmission); 95 static void process_stream_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf); 96 static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word); 134 static UINT16 l2c_fcr_tx_get_fcs (BT_HDR *p_buf) in l2c_fcr_tx_get_fcs() argument 136 UINT8 *p = ((UINT8 *) (p_buf + 1)) + p_buf->offset; in l2c_fcr_tx_get_fcs() 138 return (l2c_fcr_updcrc (L2CAP_FCR_INIT_CRC, p, p_buf->len)); in l2c_fcr_tx_get_fcs() 150 static UINT16 l2c_fcr_rx_get_fcs (BT_HDR *p_buf) in l2c_fcr_rx_get_fcs() argument 152 UINT8 *p = ((UINT8 *) (p_buf + 1)) + p_buf->offset; in l2c_fcr_rx_get_fcs() [all …]
|
D | l2c_ucd.c | 85 static void l2c_ucd_data_ind_cback (BD_ADDR rem_bda, BT_HDR *p_buf) in l2c_ucd_data_ind_cback() argument 93 p = (UINT8 *)(p_buf + 1) + p_buf->offset; in l2c_ucd_data_ind_cback() 96 p_buf->offset += L2CAP_UCD_OVERHEAD; in l2c_ucd_data_ind_cback() 97 p_buf->len -= L2CAP_UCD_OVERHEAD; in l2c_ucd_data_ind_cback() 101 osi_free (p_buf); in l2c_ucd_data_ind_cback() 103 p_rcb->ucd.cb_info.pL2CA_UCD_Data_Cb(rem_bda, p_buf); in l2c_ucd_data_ind_cback() 370 UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 flags) in L2CA_UcdDataWrite() argument 385 osi_free (p_buf); in L2CA_UcdDataWrite() 394 osi_free (p_buf); in L2CA_UcdDataWrite() 401 osi_free (p_buf); in L2CA_UcdDataWrite() [all …]
|
D | l2c_utils.c | 232 BT_HDR *p_buf = list_front(p_lcb->link_xmit_data_q); in l2cu_release_lcb() local 233 list_remove(p_lcb->link_xmit_data_q, p_buf); in l2cu_release_lcb() 234 osi_free(p_buf); in l2cu_release_lcb() 279 …tL2CAP_SEC_DATA *p_buf = (tL2CAP_SEC_DATA*) fixed_queue_dequeue(p_lcb->le_sec_pending_q, FIXED_QUE… in l2cu_release_lcb() local 280 if (p_buf->p_callback) { in l2cu_release_lcb() 281 … p_buf->p_callback(p_lcb->remote_bd_addr, p_lcb->transport, p_buf->p_ref_data, BTM_DEV_RESET); in l2cu_release_lcb() 283 osi_free(p_buf); in l2cu_release_lcb() 415 BT_HDR *p_buf = (BT_HDR *)osi_malloc(L2CAP_CMD_BUF_SIZE); in l2cu_build_header() local 418 if (!p_buf) { in l2cu_build_header() 422 p_buf->offset = L2CAP_SEND_CMD_OFFSET; in l2cu_build_header() [all …]
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/smp/ |
D | smp_utils.c | 351 BT_HDR *p_buf; in smp_send_cmd() local 357 p_buf = (*smp_cmd_build_act[cmd_code])(cmd_code, p_cb); in smp_send_cmd() 359 if (p_buf != NULL && in smp_send_cmd() 360 smp_send_msg_to_L2CAP(p_cb->pairing_bda, p_buf)) { in smp_send_cmd() 416 BT_HDR *p_buf = NULL ; in smp_build_pairing_cmd() local 420 …if ((p_buf = (BT_HDR *)osi_malloc(sizeof(BT_HDR) + SMP_PAIRING_REQ_SIZE + L2CAP_MIN_OFFSET)) != NU… in smp_build_pairing_cmd() 421 p = (UINT8 *)(p_buf + 1) + L2CAP_MIN_OFFSET; in smp_build_pairing_cmd() 431 p_buf->offset = L2CAP_MIN_OFFSET; in smp_build_pairing_cmd() 433 p_buf->len = SMP_PAIRING_REQ_SIZE; in smp_build_pairing_cmd() 436 return p_buf; in smp_build_pairing_cmd() [all …]
|
D | smp_l2c.c | 42 static void smp_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf); 47 static void smp_br_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf); 156 static void smp_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf) in smp_data_received() argument 159 UINT8 *p = (UINT8 *)(p_buf + 1) + p_buf->offset; in smp_data_received() 168 osi_free (p_buf); in smp_data_received() 179 osi_free (p_buf); in smp_data_received() 203 p_cb->rcvd_cmd_len = (UINT8) p_buf->len; in smp_data_received() 207 osi_free (p_buf); in smp_data_received() 300 static void smp_br_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf) in smp_br_data_received() argument 303 UINT8 *p = (UINT8 *)(p_buf + 1) + p_buf->offset; in smp_br_data_received() [all …]
|
/device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/utility/ |
D | utility.c | 77 void htole16(uint8_t *p_buf, uint16_t x) in htole16() argument 80 u8ptr = p_buf; in htole16() 85 void htole32(uint8_t *p_buf, uint32_t x) in htole32() argument 88 u8ptr = p_buf; in htole32() 95 void htole64(uint8_t *p_buf, uint64_t x) in htole64() argument 98 u8ptr = p_buf; in htole64() 109 uint16_t le16toh(const uint8_t *p_buf) in le16toh() argument 113 u8ptr = p_buf; in le16toh() 119 uint32_t le32toh(const uint8_t *p_buf) in le32toh() argument 123 u8ptr = p_buf; in le32toh() [all …]
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/gap/ |
D | gap_conn.c | 317 BT_HDR *p_buf = fixed_queue_try_peek_first(p_ccb->rx_queue); in GAP_ConnReadData() local 318 if (p_buf == NULL) { in GAP_ConnReadData() 322 copy_len = (p_buf->len > max_len)?max_len:p_buf->len; in GAP_ConnReadData() 326 memcpy (p_data, (UINT8 *)(p_buf + 1) + p_buf->offset, copy_len); in GAP_ConnReadData() 330 if (p_buf->len > copy_len) { in GAP_ConnReadData() 331 p_buf->offset += copy_len; in GAP_ConnReadData() 332 p_buf->len -= copy_len; in GAP_ConnReadData() 401 BT_HDR *p_buf; in GAP_ConnBTRead() local 407 p_buf = (BT_HDR *)fixed_queue_dequeue(p_ccb->rx_queue, 0); in GAP_ConnBTRead() 409 if (p_buf) { in GAP_ConnBTRead() [all …]
|
/device/soc/esp/esp32/components/bt/host/bluedroid/btc/profile/std/spp/ |
D | btc_spp.c | 814 BT_HDR *p_buf; in btc_spp_write() local 815 … if ((p_buf = fixed_queue_try_peek_first(slot->tx.queue)) != NULL && p_buf->layer_specific == 0) { in btc_spp_write() 816 p_buf->event++; in btc_spp_write() 817 p_buf->layer_specific = 1; in btc_spp_write() 818 … BTA_JvRfcommWrite(arg->write.handle, slot->id, p_buf->len, p_buf->data + p_buf->offset); in btc_spp_write() 1017 BT_HDR *p_buf; in btc_spp_cb_handler() local 1019 if ((p_buf = fixed_queue_try_peek_first(slot->tx.queue)) == NULL) { in btc_spp_cb_handler() 1023 p_buf->len -= p_data->rfc_write.len; in btc_spp_cb_handler() 1024 p_buf->offset += p_data->rfc_write.len; in btc_spp_cb_handler() 1025 p_buf->layer_specific = 0; in btc_spp_cb_handler() [all …]
|
/device/board/hisilicon/hispark_phoenix/peripherals/bluetooth/rtkbt/code/rtkcmd/ |
D | rtkcmd.c | 77 Rtk_Socket_Data *p_buf = NULL; in Rtkbt_Sendcmd() local 106 p_buf = (Rtk_Socket_Data *)malloc(sizeof(Rtk_Socket_Data) + sizeof(char) * ParamLen); in Rtkbt_Sendcmd() 107 p_buf->type = 0x01; in Rtkbt_Sendcmd() 108 p_buf->opcodeh = OpCode >> 8; in Rtkbt_Sendcmd() 109 p_buf->opcodel = OpCode & 0xff; in Rtkbt_Sendcmd() 110 p_buf->parameter_len = ParamLen; in Rtkbt_Sendcmd() 118 p_buf->parameter[i++] = strtol(token, NULL, 0); in Rtkbt_Sendcmd() 134 sendlen = sizeof(Rtk_Socket_Data) + sizeof(char) * p_buf->parameter_len; in Rtkbt_Sendcmd() 135 ret = write(socketfd, p_buf, sendlen); in Rtkbt_Sendcmd() 139 free(p_buf); in Rtkbt_Sendcmd()
|
/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/ |
D | oal_mm.h | 100 static inline hi_void oal_free(const hi_void *p_buf) in oal_free() argument 102 kfree(p_buf); in oal_free() 105 static inline hi_void oal_free(hi_void *p_buf) in oal_free() argument 107 free(p_buf); in oal_free() 111 static inline hi_void oal_vfree(hi_void *p_buf) in oal_vfree() argument 114 vfree(p_buf); in oal_vfree() 116 free(p_buf); in oal_vfree()
|