TI BLE5-Stack API Documentation
1.00.01.05
|
This file contains configuration, initialization, and parameter management of Micro BLE Stack. It also contains interfacing between Micro BLE Stack and the application.
Go to the source code of this file.
Macros | |
#define | BLE_TO_RAT 2500 |
1 BLE tick(0.625 ms) = 2500 RAT tick | |
#define | BYTE_TO_RAT (8 * US_TO_RAT) |
1 byte = 8 us = 32 RAT tick, assuming 1 Mbps PHY | |
#define | MS_TO_RAT 4000 |
1 ms = 4000 RAT tick | |
#define | MS_TO_SYSTICK (1000 / Clock_tickPeriod) |
1 ms = (1000 / Clock_tickPeriod) system tick | |
#define | RF_PRI_HIGH ((uint8) RF_PriorityHigh) |
High Priority. | |
#define | RF_PRI_HIGHEST ((uint8) RF_PriorityHighest) |
Highest Priority. | |
#define | RF_PRI_NORMAL ((uint8) RF_PriorityNormal) |
Normal Priority. | |
#define | RF_TIME_CRITICAL 1 |
Critical Timing. | |
#define | RF_TIME_RELAXED 0 |
Relaxed Timing. | |
#define | SYSTICK_TO_RAT (Clock_tickPeriod * US_TO_RAT) |
1 system tick = (Clock_tickPeriod * US_TO_RAT) RAT tick | |
#define | UB_ADDRTYPE_BD 4 |
Device that is currently being used. | |
#define | UB_ADDRTYPE_NONRESOLVABLE 2 |
Random Private Nonresolvable Address. | |
#define | UB_ADDRTYPE_PUBLIC 0 |
Public Address. | |
#define | UB_ADDRTYPE_RESOLVABLE 3 |
Random Private Resolvable Address. | |
#define | UB_ADDRTYPE_STATIC 1 |
Random Static Address. | |
#define | UB_ADV_CHAN_37 0x01 |
Channel 37. | |
#define | UB_ADV_CHAN_38 0x02 |
Channel 38. | |
#define | UB_ADV_CHAN_39 0x04 |
Channel 39. | |
#define | UB_ADV_CHAN_ALL (UB_ADV_CHAN_37 | UB_ADV_CHAN_38 | UB_ADV_CHAN_39) |
All Channels. | |
#define | UB_ADVTYPE_ADV_NC 5 |
associated with CMD_BLE_ADV_NC | |
#define | UB_ADVTYPE_ADV_SCAN 6 |
associated with CMD_BLE_ADV_SCAN | |
#define | UB_EVTDST_GAP 1 |
GAP. | |
#define | UB_EVTDST_LL 0 |
LL. More... | |
#define | UB_MAX_ADV_INTERVAL 16384 |
Maximum Advertising Interval. | |
#define | UB_MAX_ADVDATA_LEN B_MAX_ADV_LEN |
Max Advertising Data Length. | |
#define | UB_MAX_CHANNEL_MAP UB_ADV_CHAN_ALL |
Maximum Channel Map. | |
#define | UB_MAX_TX_POWER TX_POWER_5_DBM |
5 dBm | |
#define | UB_MIN_ADV_INTERVAL 160 |
Minimum Advertising interval. | |
#define | UB_MIN_CHANNEL_MAP UB_ADV_CHAN_37 |
Minimum Channel Map. | |
#define | UB_MIN_TX_POWER TX_POWER_MINUS_21_DBM |
-21 dBm | |
#define | UB_NUM_EVTDST 2 |
Number of Event Destinations. | |
#define | UB_NUM_PARAM (UB_PARAM_SCAN_END+1) |
#define | UB_PARAM_ADV_SR_END UB_PARAM_ADVFLTPOLICY |
#define | UB_PARAM_ADVCHANMAP (UB_PARAM_ADV_CMN_START+1) |
Advertising Channel map. More... | |
#define | UB_PARAM_ADVDATA (UB_PARAM_ADV_CMN_START+4) |
Advertising Data. More... | |
#define | UB_PARAM_ADVFLTPOLICY (UB_PARAM_ADV_SR_START+1) |
Advertising Filter Policy. More... | |
#define | UB_PARAM_ADVINTERVAL (UB_PARAM_ADV_CMN_START+0) |
Advertising Interval (n * 0.625 ms) More... | |
#define | UB_PARAM_ADVTYPE (UB_PARAM_ADV_CMN_START+2) |
Type of Advertising. More... | |
#define | UB_PARAM_DFLT_ADVCHANMAP UB_ADV_CHAN_ALL |
All Channels. | |
#define | UB_PARAM_DFLT_ADVDATA {0} |
No data. | |
#define | UB_PARAM_DFLT_ADVFLTPOLICY 0 |
TBD. | |
#define | UB_PARAM_DFLT_ADVINTERVAL 1600 |
1 sec | |
#define | UB_PARAM_DFLT_ADVTYPE UB_ADVTYPE_ADV_NC |
ADV_NONCONN_IND. | |
#define | UB_PARAM_DFLT_RFPRIORITY RF_PRI_NORMAL |
RF_PriorityNormal. | |
#define | UB_PARAM_DFLT_RFTIMECRIT RF_TIME_RELAXED |
Time-relaxed. | |
#define | UB_PARAM_DFLT_SCANRSPDATA {0} |
No data. | |
#define | UB_PARAM_DFLT_TIMETOADV 0 |
Disabled. | |
#define | UB_PARAM_DFLT_TXPOWER TX_POWER_0_DBM |
0 dBm | |
#define | UB_PARAM_RFPRIORITY (UB_PARAM_COMMON_START+0) |
Priority used for RF command scheduling. More... | |
#define | UB_PARAM_SCAN_END UB_PARAM_ADV_SR_END |
#define | UB_PARAM_SCANRSPDATA (UB_PARAM_ADV_SR_START+0) |
Scan response Data. More... | |
#define | UB_PARAM_TIMETOADV (UB_PARAM_ADV_CMN_START+3) |
How early the application wants to get a notification before each advertising event happens (ms) More... | |
#define | UB_PARAM_TXPOWER (UB_PARAM_COMMON_START+1) |
TX Power. More... | |
#define | UB_TX_POWER_INVALID 0xFFFF |
Invalid TX Power Register value. | |
#define | US_TO_RAT 4 |
1 us = 4 RAT tick More... | |
Typedefs | |
typedef uint8 | ubAddrType_t |
Address Type. | |
typedef uint8 | ubEvt_t |
Micro BLE Stack Event. | |
typedef uint8 | ubEvtDst_t |
Recipient of Micro BLE Stack Event. | |
typedef uint8 | ubMsg_t |
Type of Micro BLE Stack message. | |
typedef void(* | ubPostEvtProxyCB_t) (void) |
Type of the callback to have ub_processMsg called in the application task context. More... | |
typedef void(* | ubProcessMsg_t) (ubEvtMsg_t *pEvtMsg) |
Function to process event messages destined to the calle module. | |
Functions | |
bStatus_t | ub_checkAddr (ubAddrType_t addrType, uint8 *pAddr) |
Check if the given address is valid. More... | |
bStatus_t | ub_getAddr (ubAddrType_t addrType, uint8 *pAddr) |
Retrieve the address corresponding to the given address type. More... | |
bStatus_t | ub_getParameter (uint8 param, void *pValue) |
Get a Micro BLE Stack parameter. More... | |
void | ub_processMsg (void) |
Let the Micro Stack process the queued messages. More... | |
void | ub_resetAddr (void) |
Make BD Addr revert to Random Static Address if exists or Public Address otherwise. | |
bStatus_t | ub_setParameter (uint8 param, uint8 len, void *pValue) |
Set a Micro BLE Stack parameter. More... | |
bStatus_t | ub_stackInit (ubAddrType_t addrType, uint8 *pStaticAddr, ubPostEvtProxyCB_t pfnPostEvtProxyCB, uint8 timeCritical) |
Initialize Micro BLE Stack. More... | |