jump_function.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. /**
  2. * @file
  3. * @author chipsea
  4. * @brief This file contains the definitions of the macros and functions that are
  5. * architecture dependent. The implementation of those is implemented in the
  6. * appropriate architecture directory.
  7. * @version 0.1
  8. * @date 2020-11-30
  9. * @copyright Copyright (c) 2020, CHIPSEA Co., Ltd.
  10. * @note
  11. */
  12. #ifndef _JUMP_FUNC_H_
  13. #define _JUMP_FUNC_H_
  14. #include <stdint.h>
  15. #include "types.h"
  16. #include "ll_def.h"
  17. #include "ll_sleep.h"
  18. #include "hci.h"
  19. #include "l2cap.h"
  20. // ===================== MACROS =======================
  21. #define JUMP_BASE_ADDR 0x1fff0000
  22. #define JUMP_FUNCTION(x) (*(uint32 *)(JUMP_BASE_ADDR + (x << 2)))
  23. // ROM function entries
  24. // 0 - 10 for common
  25. #define OSAL_INIT_TASKS 1
  26. #define TASKS_ARRAY 2
  27. #define TASK_COUNT 3
  28. #define TASK_EVENTS 4
  29. #define OSAL_MEM_INIT 5
  30. #define LL_INIT 11
  31. #define LL_PROCESS_EVENT 12
  32. #define LL_RESET 13
  33. #define LL_TXDATA 14
  34. #define LL_DISCONNECT 15
  35. #define LL_SET_ADV_PARAM 16
  36. #define LL_SET_ADV_DATA 17
  37. #define LL_SET_ADV_CONTROL 18
  38. #define LL_SET_DEFAULT_CONN_PARAM 19
  39. #define LL_EXT_SET_TX_POWER 20
  40. #define LL_CLEAR_WHITE_LIST 21
  41. #define LL_ADD_WHITE_LIST_DEV 22
  42. #define LL_REMOVE_WHITE_LIST_DEV 23
  43. #define LL_READ_WHITE_LIST_SIZE 24
  44. #define LL_NUM_EMPTY_WL_ENTRIES 25
  45. #define LL_SLAVE_EVT_ENDOK 26
  46. #define LL_SETUP_NEXT_SLAVE_EVT 27
  47. #define LL_CHK_LSTO_DURING_SL 28
  48. #define LL_PROCESS_SLAVE_CTRL_PROC 29
  49. #define LL_PROCESS_SLAVE_CTRL_PKT 30
  50. #define LL_SLAVE_EVT_ABORT 31
  51. #define LL_PROCESS_RX_DATA 32
  52. #define LL_PROCESS_TX_DATA 33
  53. #define LL_CONN_TERMINATE 34
  54. #define LL_WRITE_TX_DATA 35
  55. #define LL_EVT_SCHEDULE 36
  56. #define LL_MOVE_TO_SLAVE_FUNCTION 37
  57. #define LL_SLAVE_CONN_EVENT 38
  58. #define LL_SETUP_ADV 39
  59. #define LL_SETUP_UNDIRECT_ADV 40
  60. #define LL_SETUP_NOCONN_ADV 41
  61. #define LL_SETUP_SCAN_ADV 42
  62. #define LL_SETUP_DIRECT_ADV 43
  63. #define LL_CALC_TIMER_DRIFT 44
  64. #define LL_GENERATE_TX_BUFFER 45
  65. #define LL_READ_RX_FIFO 46
  66. #define LL_READ_TX_FIFO_RTLP 47
  67. #define LL_READ_TX_FIFO_PKT 48
  68. #define LL_HW_PROCESS_RTO 49
  69. #define LL_HW_SET_TIMING 50
  70. #define LL_RELEASE_CONN_ID 51
  71. #define LL_READ_TX_PWR_LVL 52 // A1 ROM metal change add
  72. #define LL_READ_ADV_TX_PWR_LVL 53 // A1 ROM metal change add
  73. #define LL_READ_RSSI 54 // A1 ROM metal change add
  74. #define LL_READ_REMOTE_USE_FEATURES 55 // A1 ROM metal change add
  75. #define LL_ENCRYPT 56 // A1 ROM metal change add
  76. #define LL_DIRECT_TEST_END 57 // A1 ROM metal change add
  77. #define LL_DIRECT_TEST_TX_TEST 58 // A1 ROM metal change add
  78. #define LL_DIRECT_TEST_RX_TEST 59 // A1 ROM metal change add
  79. #define OSAL_POWER_CONSERVE 60
  80. #define ENTER_SLEEP_PROCESS 61
  81. #define WAKEUP_PROCESS 62
  82. #define CONFIG_RTC 63
  83. #define ENTER_SLEEP_OFF_MODE 64 // A1 ROM metal change add
  84. #define HAL_PROCESS_POLL 65 // A1 ROM metal change add
  85. #define LL_HW_GO 66 // A1 ROM metal change add
  86. #define LL_HW_TRIGGER 67 // A1 ROM metal change add
  87. #define LL_SET_TX_PWR_LVL 68 // A1 ROM metal change add
  88. // LL AES
  89. #define LL_AES128_ENCRYPT 70 // A1 ROM metal change add
  90. #define LL_GEN_TRUE_RANDOM 71 // A1 ROM metal change add
  91. #define LL_GEN_DEVICE_SKD 72 // A1 ROM metal change add
  92. #define LL_GEN_DEVICE_IV 73 // A1 ROM metal change add
  93. #define LL_GENERATE_NOUNCE 74 // A1 ROM metal change add
  94. #define LL_ENC_ENCRYPT 75 // A1 ROM metal change add
  95. #define LL_ENC_DECRYPT 76 // A1 ROM metal change add
  96. // host entries
  97. #define SMP_INIT 80
  98. #define SMP_PROCESS_EVENT 81
  99. // l2cap entries
  100. #define L2CAP_PARSE_PACKET 82
  101. #define L2CAP_ENCAP_PACKET 83
  102. #define L2CAP_PKT_TO_SEGBUFF 84
  103. #define L2CAP_SEGBUFF_TO_LINKLAYER 85
  104. #define L2CAP_PROCESS_FREGMENT_TX_DATA 86
  105. //gap linkmgr entries
  106. #define GAP_LINK_MGR_PROCESS_CONNECT_EVT 87
  107. #define GAP_LINK_MGR_PROCESS_DISCONNECT_EVT 88
  108. // hci tl
  109. #define HCI_INIT 90 // A1 ROM metal change add
  110. #define HCI_PROCESS_EVENT 91 // A1 ROM metal change add
  111. // app entries
  112. #define APP_SLEEP_PROCESS 100
  113. #define APP_WAKEUP_PROCESS 101
  114. #define RF_INIT 102
  115. #define WAKEUP_INIT 103
  116. #define BOOT_INIT 104
  117. #define DEBUG_PRINT 105
  118. #define RF_CALIBRATTE 106 // A1 ROM metal change add
  119. #define RF_PHY_CHANGE 107 // A1 ROM metal change add
  120. // LL master, A2 ROM metal change add
  121. #define LL_MASTER_EVT_ENDOK 110
  122. #define LL_SETUP_NEXT_MASTER_EVT 111
  123. #define LL_PROCESS_MASTER_CTRL_PROC 112
  124. #define LL_PROCESS_MASTER_CTRL_PKT 113
  125. #define LL_MOVE_TO_MASTER_FUNCTION 114
  126. #define LL_MASTER_CONN_EVENT 115
  127. #define LL_SET_SCAN_CTRL 116
  128. #define LL_SET_SCAN_PARAM 117
  129. #define LL_CREATE_CONN 118
  130. #define LL_CREATE_CONN_CANCEL 119
  131. #define LL_START_ENCRYPT 120
  132. #define LL_SETUP_SCAN 121
  133. #define LL_SETUP_SEC_NOCONN_ADV 122
  134. #define LL_SETUP_SEC_SCAN 123
  135. #define LL_SEC_ADV_ALLOW 124
  136. #define LL_CALC_MAX_SCAN_TIME 125
  137. // A2 multi-connection
  138. #define LL_SETUP_SEC_ADV_ENTRY 126
  139. #define LL_SETUP_SEC_CONN_ADV 127
  140. #define LL_SETUP_SEC_SCANNABLE_ADV 128
  141. //DLE
  142. #define LL_SET_DATA_LENGTH 130
  143. #define LL_PDU_LENGTH_UPDATE 131
  144. #define LL_TRX_NUM_ADJUST 132
  145. //CS UPDATE
  146. #define LL_SET_PHY_MODE 133
  147. #define LL_PHY_MODE_UPDATE 134
  148. #define LL_SET_NEXT_PHY_MODE 135
  149. #define LL_ADP_ADJ_NEXT_TIME 136
  150. #define LL_ADP_SMART_WINDOW 137
  151. #define LL_SET_NEXT_DATA_CHN 138
  152. #define LL_DISABLE_LATENCY 139
  153. #define LL_ENABLE_LATENCY 140
  154. #define LL_SETUP_EXT_ADV_EVENT 141
  155. #define LL_SETUP_PRD_ADV_EVENT 142
  156. #define LL_SETUP_ADV_EXT_IND_PDU 143
  157. #define LL_SETUP_AUX_ADV_IND_PDU 144
  158. #define LL_SETUP_AUX_SYNC_IND_PDU 145
  159. #define LL_SETUP_AUX_CHAIN_IND_PDU 146
  160. #define LL_SETUP_AUX_CONN_REQ_PDU 147
  161. #define LL_SETUP_AUX_CONN_RSP_PDU 148
  162. #define LL_SCHEDULER 149
  163. #define LL_ADD_TASK 150
  164. #define LL_DEL_TASK 151
  165. #define LL_ADV_SCHEDULER 152
  166. #define LL_ADV_ADD_TASK 153
  167. #define LL_ADV_DEL_TASK 154
  168. #define LL_ADV_SCHEDULER_PRD 155
  169. #define LL_ADV_ADD_TASK_PRD 156
  170. #define LL_ADV_DEL_TASK_PRD 157
  171. #define LL_GET_NEXT_AUX_CHN 158
  172. #define LL_SETUP_AUX_SCAN_RSP_PDU 159
  173. #define LL_PROCESSBASICIRQ_SCANTRX 162
  174. // 2020-02-13 Add for CTE
  175. #define LL_CONNLESS_CTE_TX_PARAM 203
  176. #define LL_CONNLESS_CTE_TX_ENABLE 204
  177. #define LL_CONNLESS_IQ_SAMPLE_ENABLE 205
  178. #define LL_CONN_CTE_RECV_PARAM 206
  179. #define LL_CONN_CTE_REQ_EN 207
  180. #define LL_CONN_CTE_TX_PARAM 208
  181. #define LL_CONN_CTE_RSP_EN 209
  182. //OSAL
  183. #define OSAL_SET_EVENT 210
  184. #define OSAL_MSG_SEND 211
  185. #define HAL_DRV_IRQ_INIT 212
  186. #define HAL_DRV_IRQ_ENABLE 213
  187. #define HAL_DRV_IRQ_DISABLE 214
  188. #define HAL_WATCHDOG_INIT 215
  189. // interrupt request handler
  190. #define NMI_HANDLER 219
  191. #define HARDFAULT_HANDLER 220
  192. #define SVC_HANDLER 221
  193. #define PENDSV_HANDLER 222
  194. #define SYSTICK_HANDLER 223
  195. #define V0_IRQ_HANDLER 224
  196. #define V1_IRQ_HANDLER 225
  197. #define V2_IRQ_HANDLER 226
  198. #define V3_IRQ_HANDLER 227
  199. #define V4_IRQ_HANDLER 228
  200. #define V5_IRQ_HANDLER 229
  201. #define V6_IRQ_HANDLER 230
  202. #define V7_IRQ_HANDLER 231
  203. #define V8_IRQ_HANDLER 232
  204. #define V9_IRQ_HANDLER 233
  205. #define V10_IRQ_HANDLER 234
  206. #define V11_IRQ_HANDLER 235
  207. #define V12_IRQ_HANDLER 236
  208. #define V13_IRQ_HANDLER 237
  209. #define V14_IRQ_HANDLER 238
  210. #define V15_IRQ_HANDLER 239
  211. #define V16_IRQ_HANDLER 240
  212. #define V17_IRQ_HANDLER 241
  213. #define V18_IRQ_HANDLER 242
  214. #define V19_IRQ_HANDLER 243
  215. #define V20_IRQ_HANDLER 244
  216. #define V21_IRQ_HANDLER 245
  217. #define V22_IRQ_HANDLER 246
  218. #define V23_IRQ_HANDLER 247
  219. #define V24_IRQ_HANDLER 248
  220. #define V25_IRQ_HANDLER 249
  221. #define V26_IRQ_HANDLER 250
  222. #define V27_IRQ_HANDLER 251
  223. #define V28_IRQ_HANDLER 252
  224. #define V29_IRQ_HANDLER 253
  225. #define V30_IRQ_HANDLER 254
  226. #define V31_IRQ_HANDLER 255
  227. #define BB_IRQ_HANDLER V4_IRQ_HANDLER /* Base band Interrupt */
  228. #define KSCAN_IRQ_HANDLER V5_IRQ_HANDLER /* Key scan Interrupt */
  229. #define RTC_IRQ_HANDLER V6_IRQ_HANDLER /* RTC Timer Interrupt */
  230. #define WDT_IRQ_HANDLER V10_IRQ_HANDLER /* Watchdog Timer Interrupt */
  231. #define UART0_IRQ_HANDLER V11_IRQ_HANDLER /* UART0 Interrupt */
  232. #define I2C0_IRQ_HANDLER V12_IRQ_HANDLER /* I2C0 Interrupt */
  233. #define I2C1_IRQ_HANDLER V13_IRQ_HANDLER /* I2C1 Interrupt */
  234. #define SPI0_IRQ_HANDLER V14_IRQ_HANDLER /* SPI0 Interrupt */
  235. #define SPI1_IRQ_HANDLER V15_IRQ_HANDLER /* SPI1 Interrupt */
  236. #define GPIO_IRQ_HANDLER V16_IRQ_HANDLER /* GPIO Interrupt */
  237. #define UART1_IRQ_HANDLER V17_IRQ_HANDLER /* UART1 Interrupt */
  238. #define SPIF_IRQ_HANDLER V18_IRQ_HANDLER /* SPIF Interrupt */
  239. #define DMAC_IRQ_HANDLER V19_IRQ_HANDLER /* DMAC Interrupt */
  240. #define TIM1_IRQ_HANDLER V20_IRQ_HANDLER /* Timer1 Interrupt */
  241. #define TIM2_IRQ_HANDLER V21_IRQ_HANDLER /* Timer2 Interrupt */
  242. #define TIM3_IRQ_HANDLER V22_IRQ_HANDLER /* Timer3 Interrupt */
  243. #define TIM4_IRQ_HANDLER V23_IRQ_HANDLER /* Timer4 Interrupt */
  244. #define TIM5_IRQ_HANDLER V24_IRQ_HANDLER /* Timer5 Interrupt */
  245. #define TIM6_IRQ_HANDLER V25_IRQ_HANDLER /* Timer6 Interrupt */
  246. #define AES_IRQ_HANDLER V28_IRQ_HANDLER /* AES Interrupt */
  247. #define ADCC_IRQ_HANDLER V29_IRQ_HANDLER /* ADC Interrupt */
  248. #define QDEC_IRQ_HANDLER V30_IRQ_HANDLER /* QDEC Interrupt */
  249. #define RNG_IRQ_HANDLER V31_IRQ_HANDLER /* RNG Interrupt */
  250. // ================== FUNCTIONS ==================================
  251. void move_to_slave_function0(void);
  252. void LL_slave_conn_event0(void);
  253. llStatus_t llSetupAdv0(void);
  254. void llSetupUndirectedAdvEvt0(void);
  255. void llSetupNonConnectableAdvEvt0( void );
  256. void llSetupScannableAdvEvt0( void );
  257. void llSetupDirectedAdvEvt0( void );
  258. void LL_evt_schedule0(void);
  259. void llCalcTimerDrift0( uint32 connInterval,
  260. uint16 slaveLatency,
  261. uint8 sleepClkAccuracy,
  262. uint32 *timerDrift ) ;
  263. uint16 ll_generateTxBuffer0(int txFifo_vacancy, uint16 *pSave_ptr);
  264. void ll_hw_read_tfifo_rtlp0(void);
  265. void ll_read_rxfifo0(void);
  266. int ll_hw_read_tfifo_packet0(uint8 *pkt);
  267. void ll_hw_process_RTO0(uint32 ack_num);
  268. void LL_set_default_conn_params0(llConnState_t *connPtr);
  269. // =====
  270. void enterSleepProcess0(uint32 time);
  271. void wakeupProcess0(void);
  272. void config_RTC0(uint32 time);
  273. void enter_sleep_off_mode0(Sleep_Mode mode);
  274. void llSlaveEvt_TaskEndOk0( void );
  275. uint8 llSetupNextSlaveEvent0( void );
  276. uint8 llCheckForLstoDuringSL0( llConnState_t *connPtr );
  277. uint8 llProcessSlaveControlProcedures0( llConnState_t *connPtr );
  278. void llProcessSlaveControlPacket0( llConnState_t *connPtr,
  279. uint8 *pBuf );
  280. void llSlaveEvt_TaskAbort0(void );
  281. // ------
  282. void llMasterEvt_TaskEndOk0( void );
  283. void llProcessMasterControlPacket0( llConnState_t *connPtr,
  284. uint8 *pBuf );
  285. uint8 llProcessMasterControlProcedures0( llConnState_t *connPtr );
  286. uint8 llSetupNextMasterEvent0( void );
  287. void move_to_master_function0(void);
  288. void LL_master_conn_event0(void);
  289. llStatus_t LL_SetScanControl0( uint8 scanMode,
  290. uint8 filterReports );
  291. llStatus_t LL_SetScanParam0( uint8 scanType,
  292. uint16 scanInterval,
  293. uint16 scanWindow,
  294. uint8 ownAddrType,
  295. uint8 scanWlPolicy );
  296. llStatus_t LL_CreateConn0( uint16 scanInterval,
  297. uint16 scanWindow,
  298. uint8 initWlPolicy,
  299. uint8 peerAddrType,
  300. uint8 *peerAddr,
  301. uint8 ownAddrType,
  302. uint16 connIntervalMin,
  303. uint16 connIntervalMax,
  304. uint16 connLatency,
  305. uint16 connTimeout,
  306. uint16 minLength,
  307. uint16 maxLength );
  308. llStatus_t LL_CreateConnCancel0( void );
  309. llStatus_t LL_StartEncrypt0( uint16 connId,
  310. uint8 *rand,
  311. uint8 *eDiv,
  312. uint8 *ltk );
  313. void llSetupScan0( uint8 chan );
  314. // ================== ll.c
  315. void LL_Init0( uint8 taskId );
  316. uint16 LL_ProcessEvent0( uint8 task_id, uint16 events );
  317. llStatus_t LL_Reset0( void );
  318. llStatus_t LL_TxData0( uint16 connId, uint8 *pBuf, uint8 pktLen, uint8 fragFlag );
  319. llStatus_t LL_Disconnect0( uint16 connId, uint8 reason );
  320. llStatus_t LL_SetAdvParam0( uint16 advIntervalMin,
  321. uint16 advIntervalMax,
  322. uint8 advEvtType,
  323. uint8 ownAddrType,
  324. uint8 directAddrType,
  325. uint8 *directAddr,
  326. uint8 advChanMap,
  327. uint8 advWlPolicy );
  328. llStatus_t LL_SetAdvData0( uint8 advDataLen, uint8 *advData );
  329. llStatus_t LL_SetAdvControl0( uint8 advMode );
  330. llStatus_t LL_EXT_SetTxPower0( uint8 txPower, uint8 *cmdComplete );
  331. llStatus_t LL_ClearWhiteList0( void );
  332. llStatus_t LL_AddWhiteListDevice0( uint8 *devAddr, uint8 addrType );
  333. llStatus_t LL_RemoveWhiteListDevice0( uint8 *devAddr, uint8 addrType );
  334. llStatus_t LL_ReadWlSize0( uint8 *numEntries );
  335. llStatus_t LL_ReadTxPowerLevel0( uint8 connId, uint8 type, int8 *txPower );
  336. llStatus_t LL_SetTxPowerLevel0( int8 txPower );
  337. llStatus_t LL_ReadAdvChanTxPower0( int8 *txPower );
  338. llStatus_t LL_ReadRssi0( uint16 connId, int8 *lastRssi );
  339. llStatus_t LL_ReadRemoteUsedFeatures0( uint16 connId );
  340. llStatus_t LL_Encrypt0( uint8 *key, uint8 *plaintextData, uint8 *encryptedData );
  341. llStatus_t LL_DirectTestEnd0( void );
  342. llStatus_t LL_DirectTestTxTest0( uint8 txFreq, uint8 payloadLen, uint8 payloadType );
  343. llStatus_t LL_DirectTestRxTest0( uint8 rxFreq );
  344. // ================ ll_common.c
  345. void llProcessTxData0( llConnState_t *connPtr, uint8 context );
  346. uint8 llProcessRxData0( void );
  347. uint8 llWriteTxData0( llConnState_t *connPtr,
  348. uint8 pktHdr,
  349. uint8 pktLen,
  350. uint8 *pBuf );
  351. void llConnTerminate0( llConnState_t *connPtr, uint8 reason );
  352. void llReleaseConnId0( llConnState_t *connPtr );
  353. // ================ ll_enc.c
  354. void LL_ENC_AES128_Encrypt0( uint8 *key,
  355. uint8 *plaintext,
  356. uint8 *ciphertext );
  357. uint8 LL_ENC_GenerateTrueRandNum0( uint8 *buf,
  358. uint8 len );
  359. void LL_ENC_GenDeviceSKD0( uint8 *SKD );
  360. void LL_ENC_GenDeviceIV0( uint8 *IV );
  361. void LL_ENC_GenerateNonce0( uint32 pktCnt,
  362. uint8 direction,
  363. uint8 *nonce );
  364. void LL_ENC_Encrypt0( llConnState_t *connPtr,
  365. uint8 pktHdr,
  366. uint8 pktLen,
  367. uint8 *pBuf );
  368. uint8 LL_ENC_Decrypt0( llConnState_t *connPtr,
  369. uint8 pktHdr,
  370. uint8 pktLen,
  371. uint8 *pBuf );
  372. // =================== osal
  373. void osal_pwrmgr_powerconserve0( void ) ;
  374. // =================== ll_hw_drv.c
  375. void ll_hw_set_timing0(uint8 pktFmt);
  376. void ll_hw_go0(void);
  377. void ll_hw_trigger0(void);
  378. // ================== SMP functions
  379. void SM_Init0( uint8 task_id );
  380. uint16 SM_ProcessEvent0( uint8 task_id, uint16 events );
  381. // ================== HCI_TL functions
  382. void HCI_Init0( uint8 task_id );
  383. uint16 HCI_ProcessEvent0( uint8 task_id, uint16 events );
  384. // ======= OSAL memory
  385. void osal_mem_init0(void);
  386. // =========== ROM -> APP function
  387. void app_sleep_process(void);
  388. void app_wakeup_process(void);
  389. void rf_init(void);
  390. void boot_init0(void);
  391. void wakeup_init0(void);
  392. void debug_print(uint32 state);
  393. void rf_calibrate0(void);
  394. void rf_phy_change_cfg(uint8 pktFmt);
  395. // ========== A2, for conn-adv, conn-scan
  396. uint8 llSetupSecNonConnectableAdvEvt0( void );
  397. uint8 llSecAdvAllow0(void);
  398. uint32 llCalcMaxScanTime0(void);
  399. void llSetupSecScan0( uint8 chan );
  400. uint8 llSetupSecAdvEvt0( void );
  401. uint8 llSetupSecConnectableAdvEvt0( void );
  402. uint8 llSetupSecScannableAdvEvt0( void );
  403. //=============== gap_linkmgr.c
  404. void gapProcessDisconnectCompleteEvt0( hciEvt_DisconnComplete_t *pPkt );
  405. void gapProcessConnectionCompleteEvt0( hciEvt_BLEConnComplete_t *pPkt );
  406. //=============== l2cap_util.c
  407. uint8 l2capParsePacket0( l2capPacket_t *pPkt, hciDataEvent_t *pHciMsg );
  408. uint8 l2capEncapSendData0( uint16 connHandle, l2capPacket_t *pPkt );
  409. uint8 l2capPktToSegmentBuff0(uint16 connHandle, l2capSegmentBuff_t* pSegBuf, uint8 blen,uint8* pBuf);
  410. void l2capPocessFragmentTxData0(uint16 connHandle);
  411. uint8 l2capSegmentBuffToLinkLayer0(uint16 connHandle, l2capSegmentBuff_t* pSegBuf);
  412. void l2capPocessFragmentTxData0(uint16 connHandle);
  413. //=============== DLE
  414. llStatus_t LL_SetDataLengh0( uint16 connId,uint16 TxOctets,uint16 TxTime );
  415. void llPduLengthUpdate0(uint16 connHandle);
  416. void llTrxNumAdaptiveConfig0(void);
  417. //===============LL ADJ WINDOW
  418. void ll_adptive_adj_next_time0(uint32 nextTime);
  419. void ll_adptive_smart_window0(uint32 irq_status,uint32 anchor_point);
  420. void llSetNextDataChan0( llConnState_t *connPtr );
  421. //=============== CS UPDATE
  422. llStatus_t LL_SetPhyMode0( uint16 connId,uint8 allPhy,uint8 txPhy, uint8 rxPhy,uint16 phyOptions);
  423. llStatus_t LL_PhyUpdate0( uint16 connId );
  424. void llSetNextPhyMode0( llConnState_t *connPtr );
  425. llStatus_t LL_DisableSlaveLatency0(uint8 connId);
  426. llStatus_t LL_EnableSlaveLatency0(uint8 connId);
  427. // ================= BBB
  428. void ll_scheduler0(uint32 time);
  429. void ll_addTask0(uint8 connId, uint32 time);
  430. void ll_deleteTask0(uint8 connId);
  431. void ll_adv_scheduler0(void);
  432. void ll_add_adv_task0(extAdvInfo_t *pExtAdv);
  433. void ll_delete_adv_task0(uint8 index);
  434. void ll_adv_scheduler_periodic0(void);
  435. void ll_add_adv_task_periodic0(periodicAdvInfo_t *pPrdAdv, extAdvInfo_t *pExtAdv);
  436. void ll_delete_adv_task_periodic0(uint8 index);
  437. uint8 llSetupExtAdvEvent0(extAdvInfo_t *pAdvInfo);
  438. uint8 llSetupPrdAdvEvent0(periodicAdvInfo_t *pPrdAdv, extAdvInfo_t *pExtAdv);
  439. void llSetupAdvExtIndPDU0(extAdvInfo_t *pAdvInfo, periodicAdvInfo_t *pPrdAdv);
  440. void llSetupAuxAdvIndPDU0(extAdvInfo_t *pAdvInfo, periodicAdvInfo_t *pPrdAdv);
  441. void llSetupAuxChainIndPDU0(extAdvInfo_t *pAdvInfo, periodicAdvInfo_t *pPrdAdv);
  442. void llSetupAuxSyncIndPDU0(extAdvInfo_t *pAdvInfo, periodicAdvInfo_t *pPrdAdv);
  443. void llSetupAuxConnectReqPDU0(void);
  444. void llSetupAuxScanRspPDU0(extAdvInfo_t *pAdvInfo);
  445. void llSetupAuxConnectRspPDU0(extAdvInfo_t *pAdvInfo);
  446. uint8 llGetNextAuxAdvChn0(uint8 current);
  447. //=============== OSAL
  448. uint8 osal_set_event0( uint8 task_id, uint16 event_flag );
  449. uint8 osal_msg_send0( uint8 destination_task, uint8 *msg_ptr );
  450. //=============== _HAL_IRQ_
  451. void drv_irq_init0(void);
  452. int drv_enable_irq0(void);
  453. int drv_disable_irq0(void);
  454. // 2020-02-13 cte jumpfunction
  455. llStatus_t LL_ConnectionlessCTE_TransmitParam0( uint8 advertising_handle,
  456. uint8 len,
  457. uint8 type,
  458. uint8 count,
  459. uint8 Pattern_LEN,
  460. uint8 *AnaIDs);
  461. llStatus_t LL_ConnectionlessCTE_TransmitEnable0( uint8 advertising_handle,uint8 enable);
  462. llStatus_t LL_ConnectionlessIQ_SampleEnable0( uint16 sync_handle,
  463. uint8 enable,
  464. uint8 slot_Duration,
  465. uint8 MaxSampledCTEs,
  466. uint8 pattern_len,
  467. uint8 *AnaIDs);
  468. llStatus_t LL_Set_ConnectionCTE_ReceiveParam0( uint16 connHandle,
  469. uint8 enable,
  470. uint8 slot_Duration,
  471. uint8 pattern_len,
  472. uint8 *AnaIDs);
  473. llStatus_t LL_Connection_CTE_Request_Enable0( uint16 connHandle,
  474. uint8 enable,
  475. uint16 Interval,
  476. uint8 len,
  477. uint8 type);
  478. llStatus_t LL_Set_ConnectionCTE_TransmitParam0( uint16 connHandle,
  479. uint8 type,
  480. uint8 pattern_len,
  481. uint8 *AnaIDs);
  482. llStatus_t LL_Connection_CTE_Response_Enable0( uint16 connHandle,uint8 enable);
  483. void hard_fault(void);
  484. #endif // _JUMP_FUNC_H_