53 #include <ti/sysbios/knl/Queue.h>
68 #define UB_PARAM_COMMON_START 0
81 #define UB_PARAM_RFPRIORITY (UB_PARAM_COMMON_START+0)
92 #define UB_PARAM_RFTIMECRIT (UB_PARAM_COMMON_START+1)
101 #define UB_PARAM_TXPOWER (UB_PARAM_COMMON_START+2)
104 #define UB_PARAM_COMMON_END UB_PARAM_TXPOWER
105 #if defined(FEATURE_ADVERTISER)
106 #define UB_PARAM_ADV_CMN_START (UB_PARAM_COMMON_END+1)
116 #define UB_PARAM_ADVINTERVAL (UB_PARAM_ADV_CMN_START+0)
124 #define UB_PARAM_ADVCHANMAP (UB_PARAM_ADV_CMN_START+1)
132 #define UB_PARAM_ADVTYPE (UB_PARAM_ADV_CMN_START+2)
144 #define UB_PARAM_TIMETOADV (UB_PARAM_ADV_CMN_START+3)
152 #define UB_PARAM_ADVDATA (UB_PARAM_ADV_CMN_START+4)
155 #define UB_PARAM_ADV_CMN_END UB_PARAM_ADVDATA
156 #if defined(FEATURE_SCAN_RESPONSE)
157 #define UB_PARAM_ADV_SR_START (UB_PARAM_ADV_CMN_END+1)
167 #define UB_PARAM_SCANRSPDATA (UB_PARAM_ADV_SR_START+0)
177 #define UB_PARAM_ADVFLTPOLICY (UB_PARAM_ADV_SR_START+1)
180 #define UB_PARAM_ADV_SR_END UB_PARAM_ADVFLTPOLICY
182 #define UB_PARAM_ADV_SR_END UB_PARAM_ADV_CMN_END
185 #define UB_PARAM_ADV_SR_END UB_PARAM_COMMON_END
187 #if defined(FEATURE_SCANNER)
188 #define UB_PARAM_SCAN_START (UB_PARAM_ADV_SR_END+1)
189 #define UB_PARAM_SCANINTERVAL (UB_PARAM_SCAN_START+0)
190 #define UB_PARAM_SCANWINDOW (UB_PARAM_SCAN_START+1)
191 #define UB_PARAM_SCANCHANMAP (UB_PARAM_SCAN_START+2)
192 #define UB_PARAM_SCANTYPE (UB_PARAM_SCAN_START+3)
193 #define UB_PARAM_FLTDUPLICATE (UB_PARAM_SCAN_START+4)
194 #define UB_PARAM_SCANFLTPOLICY (UB_PARAM_SCAN_START+5)
195 #define UB_PARAM_SCAN_END UB_PARAM_SCANFLTPOLICY
197 #define UB_PARAM_SCAN_END UB_PARAM_ADV_SR_END
199 #define UB_NUM_PARAM (UB_PARAM_SCAN_END+1)
206 #define RF_PRI_NORMAL ((uint8) RF_PriorityNormal)
207 #define RF_PRI_HIGH ((uint8) RF_PriorityHigh)
208 #define RF_PRI_HIGHEST ((uint8) RF_PriorityHighest)
214 #define RF_TIME_RELAXED 0
215 #define RF_TIME_CRITICAL 1
219 #define UB_TX_POWER_INVALID 0xFFFF
224 #define UB_ADDRTYPE_PUBLIC 0
225 #define UB_ADDRTYPE_STATIC 1
226 #define UB_ADDRTYPE_NONRESOLVABLE 2
227 #define UB_ADDRTYPE_RESOLVABLE 3
228 #define UB_ADDRTYPE_BD 4
234 #define UB_ADVTYPE_ADV_NC 5
235 #define UB_ADVTYPE_ADV_SCAN 6
242 #define UB_ADV_CHAN_37 0x01
243 #define UB_ADV_CHAN_38 0x02
244 #define UB_ADV_CHAN_39 0x04
245 #define UB_ADV_CHAN_ALL (UB_ADV_CHAN_37 | UB_ADV_CHAN_38 | UB_ADV_CHAN_39)
249 #define UB_MIN_ADV_INTERVAL 160
250 #define UB_MAX_ADV_INTERVAL 16384
251 #define UB_MIN_CHANNEL_MAP UB_ADV_CHAN_37
252 #define UB_MAX_CHANNEL_MAP UB_ADV_CHAN_ALL
253 #define UB_MIN_TX_POWER TX_POWER_MINUS_21_DBM
254 #define UB_MAX_TX_POWER TX_POWER_5_DBM
258 #define UB_PARAM_DFLT_RFPRIORITY RF_PRI_NORMAL
259 #define UB_PARAM_DFLT_RFTIMECRIT RF_TIME_RELAXED
260 #define UB_PARAM_DFLT_TXPOWER TX_POWER_0_DBM
261 #define UB_PARAM_DFLT_ADVINTERVAL 1600
262 #define UB_PARAM_DFLT_ADVCHANMAP UB_ADV_CHAN_ALL
263 #define UB_PARAM_DFLT_ADVTYPE UB_ADVTYPE_ADV_NC
264 #define UB_PARAM_DFLT_TIMETOADV 0
265 #define UB_PARAM_DFLT_ADVDATA {0}
266 #define UB_PARAM_DFLT_SCANRSPDATA {0}
267 #define UB_PARAM_DFLT_ADVFLTPOLICY 0
273 #define UB_EVTDST_LL 0
274 #define UB_EVTDST_GAP 1
275 #define UB_NUM_EVTDST 2
283 #define MS_TO_RAT 4000
285 #define BLE_TO_RAT 2500
287 #define SYSTICK_TO_RAT (Clock_tickPeriod * US_TO_RAT)
289 #define MS_TO_SYSTICK (1000 / Clock_tickPeriod)
292 #define UB_MAX_ADVDATA_LEN B_MAX_ADV_LEN
358 #if defined(FEATURE_ADVERTISER)
364 #if defined(FEATURE_SCAN_RESPONSE)
369 #if defined(FEATURE_SCANNER)
void ub_resetAddr(void)
Make BD Addr revert to Random Static Address if exists or Public Address otherwise.
void(* ubProcessMsg_t)(ubEvtMsg_t *pEvtMsg)
Function to process event messages destined to the calle module.
Definition: uble.h:347
void(* ubPostEvtProxyCB_t)(void)
Type of the callback to have ub_processMsg called in the application task context.
Definition: uble.h:342
bStatus_t ub_checkAddr(ubAddrType_t addrType, uint8 *pAddr)
Check if the given address is valid.
bStatus_t ub_getParameter(uint8 param, void *pValue)
Get a Micro BLE Stack parameter.
bStatus_t ub_setParameter(uint8 param, uint8 len, void *pValue)
Set a Micro BLE Stack parameter.
PACKED_TYPEDEF_STRUCT
Type of Micro BLE Stack event header.
Definition: uble.h:314
#define UB_MAX_ADVDATA_LEN
Max Advertising Data Length.
Definition: uble.h:292
uint8 ubEvt_t
Micro BLE Stack Event.
Definition: uble.h:311
bStatus_t ub_stackInit(ubAddrType_t addrType, uint8 *pStaticAddr, ubPostEvtProxyCB_t pfnPostEvtProxyCB)
Initialize Micro BLE Stack.
uint8 ubAddrType_t
Address Type.
Definition: uble.h:305
uint8 ubMsg_t
Type of Micro BLE Stack message.
Definition: uble.h:321
void ub_processMsg(void)
Let the Micro Stack process the queued messages.
Status_t bStatus_t
BLE Generic Status return.
Definition: bcomdef.h:243
bStatus_t ub_getAddr(ubAddrType_t addrType, uint8 *pAddr)
Retrieve the address corresponding to the given address type.
uint8 ubEvtDst_t
Recipient of Micro BLE Stack Event.
Definition: uble.h:308
This file contains configurable variables for the Micro BLE Stack radio.