123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276 |
- #ifndef BCOMDEF_H
- #define BCOMDEF_H
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- #include "comdef.h"
-
- #define CTRL_CONFIG ( ADV_NCONN_CFG | ADV_CONN_CFG | SCAN_CFG | INIT_CFG )
-
-
- #if !defined ( MAX_NUM_LL_CONN )
- #if ( CTRL_CONFIG & INIT_CFG )
- #define MAX_NUM_LL_CONN 8
- #elif ( !( CTRL_CONFIG & INIT_CFG ) && ( CTRL_CONFIG & ADV_CONN_CFG ) )
- #define MAX_NUM_LL_CONN 1
- #else
- #define MAX_NUM_LL_CONN 0
- #endif
- #endif
- #define MAX_NUM_LL_CONN_ROM_LIMT 16
- #if (MAX_NUM_LL_CONN_ROM_LIMT<MAX_NUM_LL_CONN)
- #warning "MAX_NUM_LL_CONN > MAX_NUM_LL_CONN_ROM"
- #endif
- #define B_ADDR_LEN 6
- #define KEYLEN 16
- #define B_CHANNEL_MAP_LEN 5
- #define B_EVENT_MASK_LEN 8
- #define B_LOCAL_NAME_LEN 248
- #define B_MAX_ADV_LEN 31
- #define B_MAX_EXT_ADV_LEN 229
- #define B_MAX_PERIOD_ADV_LEN 247
- #define B_MAX_IQ_LEN 0x52
- #define B_RANDOM_NUM_SIZE 8
- #define B_FEATURE_SUPPORT_LENGTH 8
- #define bleInvalidTaskID INVALID_TASK
- #define bleNotReady 0x10
- #define bleAlreadyInRequestedMode 0x11
- #define bleIncorrectMode 0x12
- #define bleMemAllocError 0x13
- #define bleNotConnected 0x14
- #define bleNoResources 0x15
- #define blePending 0x16
- #define bleTimeout 0x17
- #define bleInvalidRange 0x18
- #define bleLinkEncrypted 0x19
- #define bleProcedureComplete 0x1A
- #define bleGAPUserCanceled 0x30
- #define bleGAPConnNotAcceptable 0x31
- #define bleGAPBondRejected 0x32
- #define bleInvalidPDU 0x40
- #define bleInsufficientAuthen 0x41
- #define bleInsufficientEncrypt 0x42
- #define bleInsufficientKeySize 0x43
- #define INVALID_TASK_ID 0xFF
- #define BLE_NVID_IRK 0x02
- #define BLE_NVID_CSRK 0x03
- #define BLE_NVID_SIGNCOUNTER 0x04
- #define BLE_NVID_GAP_BOND_START 0x20
- #define BLE_NVID_GAP_BOND_END 0x5f
- #define BLE_NVID_GATT_CFG_START 0x70
- #define BLE_NVID_GATT_CFG_END 0x79
- #define GAP_EVENT_SIGN_COUNTER_CHANGED 0x4000
- #define GAP_MSG_EVENT 0xD0
- #define SM_NEW_RAND_KEY_EVENT 0xC1
- #define GATT_MSG_EVENT 0xB0
- #define GATT_SERV_MSG_EVENT 0xB1
- #define L2CAP_DATA_EVENT 0xA0
- #define L2CAP_SIGNAL_EVENT 0xA2
- #define HCI_DATA_EVENT 0x90
- #define HCI_GAP_EVENT_EVENT 0x91
- #define HCI_SMP_EVENT_EVENT 0x92
- #define HCI_EXT_CMD_EVENT 0x93
-
- typedef Status_t bStatus_t;
- #define TI_BASE_UUID_128( uuid ) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, \
- 0x00, 0x40, 0x51, 0x04, LO_UINT16( uuid ), HI_UINT16( uuid ), 0x00, 0xF0
- #ifdef __cplusplus
- }
- #endif
- #endif
|