34 #define TL_BLECMD_PKT_TYPE ( 0x01 ) 35 #define TL_ACL_DATA_PKT_TYPE ( 0x02 ) 36 #define TL_BLEEVT_PKT_TYPE ( 0x04 ) 37 #define TL_OTCMD_PKT_TYPE ( 0x08 ) 38 #define TL_OTRSP_PKT_TYPE ( 0x09 ) 39 #define TL_CLICMD_PKT_TYPE ( 0x0A ) 40 #define TL_OTNOT_PKT_TYPE ( 0x0C ) 41 #define TL_OTACK_PKT_TYPE ( 0x0D ) 42 #define TL_CLINOT_PKT_TYPE ( 0x0E ) 43 #define TL_CLIACK_PKT_TYPE ( 0x0F ) 44 #define TL_SYSCMD_PKT_TYPE ( 0x10 ) 45 #define TL_SYSRSP_PKT_TYPE ( 0x11 ) 46 #define TL_SYSEVT_PKT_TYPE ( 0x12 ) 47 #define TL_CLIRESP_PKT_TYPE ( 0x15 ) 48 #define TL_M0CMD_PKT_TYPE ( 0x16 ) 49 #define TL_LOCCMD_PKT_TYPE ( 0x20 ) 50 #define TL_LOCRSP_PKT_TYPE ( 0x21 ) 51 #define TL_TRACES_APP_PKT_TYPE ( 0x40 ) 52 #define TL_TRACES_WL_PKT_TYPE ( 0x41 ) 54 #define TL_CMD_HDR_SIZE (4) 55 #define TL_EVT_HDR_SIZE (3) 56 #define TL_EVT_CS_PAYLOAD_SIZE (4) 58 #define TL_BLEEVT_CC_OPCODE (0x0E) 59 #define TL_BLEEVT_CS_OPCODE (0x0F) 60 #define TL_BLEEVT_VS_OPCODE (0xFF) 62 #define TL_BLEEVT_CS_PACKET_SIZE (TL_EVT_HDR_SIZE + sizeof(TL_CsEvt_t)) 63 #define TL_BLEEVT_CS_BUFFER_SIZE (sizeof(TL_PacketHeader_t) + TL_BLEEVT_CS_PACKET_SIZE) 129 TL_PacketHeader_t header;
130 TL_EvtSerial_t evtserial;
141 uint8_t payload[255];
152 TL_PacketHeader_t header;
153 TL_CmdSerial_t cmdserial;
165 } TL_AclDataSerial_t;
169 TL_PacketHeader_t header;
170 TL_AclDataSerial_t AclDataSerial;
171 } TL_AclDataPacket_t;
175 uint8_t *p_BleSpareEvtBuffer;
176 uint8_t *p_SystemSpareEvtBuffer;
177 uint8_t *p_AsynchEvtPool;
178 uint32_t AsynchEvtPoolSize;
179 uint8_t *p_TracesEvtPool;
180 uint32_t TracesEvtPoolSize;
185 uint8_t *p_ThreadOtCmdRspBuffer;
186 uint8_t *p_ThreadCliRspBuffer;
187 uint8_t *p_ThreadNotAckBuffer;
192 uint8_t *p_LldTestsCliCmdRspBuffer;
193 uint8_t *p_LldTestsM0CmdBuffer;
198 uint8_t *p_LldBleCmdRspBuffer;
199 uint8_t *p_LldBleM0CmdBuffer;
204 uint8_t *p_Mac_802_15_4_CmdRspBuffer;
205 uint8_t *p_Mac_802_15_4_NotAckBuffer;
210 uint8_t *p_ZigbeeOtCmdRspBuffer;
211 uint8_t *p_ZigbeeNotAckBuffer;
212 uint8_t *p_ZigbeeNotifRequestBuffer;
221 void (* IoBusEvtCallBack) ( TL_EvtPacket_t *phcievt );
222 void (* IoBusAclDataTxAck) ( void );
223 uint8_t *p_cmdbuffer;
224 uint8_t *p_AclDataBuffer;
233 void (* IoBusCallBackCmdEvt) (TL_EvtPacket_t *phcievt);
234 void (* IoBusCallBackUserEvt) (TL_EvtPacket_t *phcievt);
235 uint8_t *p_cmdbuffer;
246 void TL_Enable(
void );
247 void TL_Init(
void );
252 int32_t TL_BLE_Init(
void* pConf );
253 int32_t TL_BLE_SendCmd( uint8_t* buffer, uint16_t size );
254 int32_t TL_BLE_SendAclData( uint8_t* buffer, uint16_t size );
259 int32_t TL_SYS_Init(
void* pConf );
260 int32_t TL_SYS_SendCmd( uint8_t* buffer, uint16_t size );
266 void TL_OT_SendCmd(
void );
267 void TL_CLI_SendCmd(
void );
268 void TL_OT_CmdEvtReceived( TL_EvtPacket_t * Otbuffer );
269 void TL_THREAD_NotReceived( TL_EvtPacket_t * Notbuffer );
270 void TL_THREAD_SendAck (
void );
271 void TL_THREAD_CliSendAck (
void );
272 void TL_THREAD_CliNotReceived( TL_EvtPacket_t * Notbuffer );
278 void TL_LLDTESTS_SendCliCmd(
void );
279 void TL_LLDTESTS_ReceiveCliRsp( TL_CmdPacket_t * Notbuffer );
280 void TL_LLDTESTS_SendCliRspAck(
void );
281 void TL_LLDTESTS_ReceiveM0Cmd( TL_CmdPacket_t * Notbuffer );
282 void TL_LLDTESTS_SendM0CmdAck(
void );
288 void TL_LLD_BLE_SendCliCmd(
void );
289 void TL_LLD_BLE_ReceiveCliRsp( TL_CmdPacket_t * Notbuffer );
290 void TL_LLD_BLE_SendCliRspAck(
void );
291 void TL_LLD_BLE_ReceiveM0Cmd( TL_CmdPacket_t * Notbuffer );
292 void TL_LLD_BLE_SendM0CmdAck(
void );
293 void TL_LLD_BLE_SendCmd(
void );
294 void TL_LLD_BLE_ReceiveRsp( TL_CmdPacket_t * Notbuffer );
295 void TL_LLD_BLE_SendRspAck(
void );
300 void TL_MM_EvtDone( TL_EvtPacket_t * hcievt );
305 void TL_TRACES_Init(
void );
306 void TL_TRACES_EvtReceived( TL_EvtPacket_t * hcievt );
312 void TL_MAC_802_15_4_SendCmd(
void );
313 void TL_MAC_802_15_4_CmdEvtReceived( TL_EvtPacket_t * Otbuffer );
314 void TL_MAC_802_15_4_NotReceived( TL_EvtPacket_t * Notbuffer );
315 void TL_MAC_802_15_4_SendAck (
void );
321 void TL_ZIGBEE_SendM4RequestToM0(
void );
322 void TL_ZIGBEE_SendM4AckToM0Notify (
void );
323 void TL_ZIGBEE_NotReceived( TL_EvtPacket_t * Notbuffer );
324 void TL_ZIGBEE_CmdEvtReceived( TL_EvtPacket_t * Otbuffer );
325 void TL_ZIGBEE_M0RequestReceived(TL_EvtPacket_t * Otbuffer );
326 void TL_ZIGBEE_SendM4AckToM0Request(
void);
Common file to utilities.
Contain the BLE HCI Init Configuration.
Contain the SYSTEM HCI Init Configuration.
typedef PACKED_STRUCT
< Packet header