54 #define UBLE_PARAM_COMMON_START 0 67 #define UBLE_PARAM_RFPRIORITY (UBLE_PARAM_COMMON_START+0) 76 #define UBLE_PARAM_TXPOWER (UBLE_PARAM_COMMON_START+1) 79 #define UBLE_PARAM_COMMON_END UBLE_PARAM_TXPOWER 80 #if defined(FEATURE_ADVERTISER) 82 #define UBLE_PARAM_ADV_CMN_START (UBLE_PARAM_COMMON_END+1) 93 #define UBLE_PARAM_ADVINTERVAL (UBLE_PARAM_ADV_CMN_START+0) 101 #define UBLE_PARAM_ADVCHANMAP (UBLE_PARAM_ADV_CMN_START+1) 109 #define UBLE_PARAM_ADVTYPE (UBLE_PARAM_ADV_CMN_START+2) 121 #define UBLE_PARAM_TIMETOADV (UBLE_PARAM_ADV_CMN_START+3) 129 #define UBLE_PARAM_ADVDATA (UBLE_PARAM_ADV_CMN_START+4) 132 #define UBLE_PARAM_ADV_CMN_END UBLE_PARAM_ADVDATA 133 #if defined(FEATURE_SCAN_RESPONSE) 135 #define UBLE_PARAM_ADV_SR_START (UBLE_PARAM_ADV_CMN_END+1) 146 #define UBLE_PARAM_SCANRSPDATA (UBLE_PARAM_ADV_SR_START+0) 156 #define UBLE_PARAM_ADVFLTPOLICY (UBLE_PARAM_ADV_SR_START+1) 157 #define UBLE_PARAM_ADV_SR_END UBLE_PARAM_ADVFLTPOLICY 161 #define UBLE_PARAM_ADV_SR_END UBLE_PARAM_ADV_CMN_END 166 #define UBLE_PARAM_ADV_SR_END UBLE_PARAM_COMMON_END 170 #if defined(FEATURE_SCANNER) 171 #define UBLE_PARAM_SCAN_START (UBLE_PARAM_ADV_SR_END+1) 181 #define UBLE_PARAM_SCANINTERVAL (UBLE_PARAM_SCAN_START+0) 189 #define UBLE_PARAM_SCANWINDOW (UBLE_PARAM_SCAN_START+1) 197 #define UBLE_PARAM_SCANCHANMAP (UBLE_PARAM_SCAN_START+2) 205 #define UBLE_PARAM_SCANTYPE (UBLE_PARAM_SCAN_START+3) 213 #define UBLE_PARAM_FLTDUPLICATE (UBLE_PARAM_SCAN_START+4) 221 #define UBLE_PARAM_SCANFLTPOLICY (UBLE_PARAM_SCAN_START+5) 222 #define UBLE_PARAM_SCAN_END UBLE_PARAM_SCANFLTPOLICY 226 #define UBLE_PARAM_SCAN_END UBLE_PARAM_ADV_SR_END 230 #if defined(FEATURE_MONITOR) 231 #define UBLE_PARAM_MONITOR_START (UBLE_PARAM_ADV_SR_END+1) 242 #define UBLE_PARAM_SESSIONID (UBLE_PARAM_MONITOR_START+0) 250 #define UBLE_PARAM_MONITOR_CHAN (UBLE_PARAM_MONITOR_START+1) 258 #define UBLE_PARAM_MONITOR_DURATION (UBLE_PARAM_MONITOR_START+2) 266 #define UBLE_PARAM_MONITOR_START_TIME (UBLE_PARAM_MONITOR_START+3) 274 #define UBLE_PARAM_MONITOR_ACCESS_ADDR (UBLE_PARAM_MONITOR_START+4) 275 #define UBLE_PARAM_MONITOR_END UBLE_PARAM_MONITOR_ACCESS_ADDR 279 #define UBLE_PARAM_MONITOR_END UBLE_PARAM_ADV_SR_END 283 #define UBLE_NUM_PARAM (UBLE_PARAM_MONITOR_END+1) 291 #define UBLE_RF_PRI_NORMAL ((uint8) RF_PriorityNormal) 292 #define UBLE_RF_PRI_HIGH ((uint8) RF_PriorityHigh) 293 #define UBLE_RF_PRI_HIGHEST ((uint8) RF_PriorityHighest) 299 #define RF_TIME_RELAXED 0 300 #define RF_TIME_CRITICAL 1 304 #define UBLE_TX_POWER_INVALID 0xFFFF 309 #define UBLE_ADDRTYPE_PUBLIC 0 310 #define UBLE_ADDRTYPE_STATIC 1 311 #define UBLE_ADDRTYPE_NONRESOLVABLE 2 312 #define UBLE_ADDRTYPE_RESOLVABLE 3 313 #define UBLE_ADDRTYPE_BD 4 319 #define UBLE_ADVTYPE_ADV_NC 5 320 #define UBLE_ADVTYPE_ADV_SCAN 6 327 #define UBLE_ADV_CHAN_37 0x01 328 #define UBLE_ADV_CHAN_38 0x02 329 #define UBLE_ADV_CHAN_39 0x04 330 #define UBLE_ADV_CHAN_ALL (UBLE_ADV_CHAN_37 | UBLE_ADV_CHAN_38 | UBLE_ADV_CHAN_39) 334 #define UBLE_MIN_ADV_INTERVAL 160 335 #define UBLE_MAX_ADV_INTERVAL 16384 336 #define UBLE_MIN_CHANNEL_MAP UBLE_ADV_CHAN_37 337 #define UBLE_MAX_CHANNEL_MAP UBLE_ADV_CHAN_ALL 338 #define UBLE_MIN_TX_POWER TX_POWER_MINUS_21_DBM 339 #define UBLE_MAX_TX_POWER TX_POWER_5_DBM 340 #define UBLE_MIN_SCAN_INTERVAL 4 341 #define UBLE_MAX_SCAN_INTERVAL 16384 342 #define UBLE_MIN_SCAN_WINDOW 4 343 #define UBLE_MAX_SCAN_WINDOW 16384 344 #define UBLE_MIN_MONITOR_HANDLE 0 345 #define UBLE_MAX_MONITOR_HANDLE 4 346 #define UBLE_MIN_MONITOR_CHAN 0 347 #define UBLE_MAX_MONITOR_CHAN 39 348 #define UBLE_MIN_MONITOR_DURATION 0 349 #define UBLE_MAX_MONITOR_DURATION 64000 352 #define UBLE_PARAM_DFLT_RFPRIORITY UBLE_RF_PRI_NORMAL 353 #define UBLE_PARAM_DFLT_RFTIMECRIT RF_TIME_RELAXED 354 #define UBLE_PARAM_DFLT_TXPOWER TX_POWER_0_DBM 355 #define UBLE_PARAM_DFLT_ADVINTERVAL 1600 356 #define UBLE_PARAM_DFLT_ADVCHANMAP UBLE_ADV_CHAN_ALL 357 #define UBLE_PARAM_DFLT_ADVTYPE UBLE_ADVTYPE_ADV_NC 358 #define UBLE_PARAM_DFLT_TIMETOADV 0 359 #define UBLE_PARAM_DFLT_ADVDATA {0} 360 #define UBLE_PARAM_DFLT_SCANRSPDATA {0} 361 #define UBLE_PARAM_DFLT_ADVFLTPOLICY 0 362 #define UBLE_PARAM_DFLT_SCANINTERVAL 16 363 #define UBLE_PARAM_DFLT_SCANWINDOW 16 364 #define UBLE_PARAM_DFLT_SCANCHAN UBLE_ADV_CHAN_ALL 365 #define UBLE_PARAM_DFLT_SCANTYPE 0 366 #define UBLE_PARAM_DFLT_FLTDUPLICATE 0 367 #define UBLE_PARAM_DFLT_SCANFLTPOLICY 0 368 #define UBLE_PARAM_DFLT_MONITOR_HANDLE 0 369 #define UBLE_PARAM_DFLT_MONITOR_CHAN 37 370 #define UBLE_PARAM_DFLT_MONITOR_DURATION 320 371 #define UBLE_PARAM_DFLT_MONITOR_START_TIME 6400 372 #define UBLE_PARAM_DFLT_MONITOR_ACCESS_ADDR 0x8E89BED6 378 #define UBLE_EVTDST_LL 0 379 #define UBLE_EVTDST_GAP 1 380 #define UBLE_NUM_EVTDST 2 388 #define MS_TO_RAT 4000 390 #define BLE_TO_RAT 2500 392 #define SYSTICK_TO_RAT (Clock_tickPeriod * US_TO_RAT) 394 #define MS_TO_SYSTICK (1000 / Clock_tickPeriod) 396 #define BLE_TO_SYSTICK (625 / Clock_tickPeriod) 398 #define BYTE_TO_RAT (8 * US_TO_RAT) 401 #define UBLE_MAX_ADVDATA_LEN B_MAX_ADV_LEN 422 PACKED_TYPEDEF_STRUCT {
423 port_queueElem_t pElem;
431 PACKED_TYPEDEF_STRUCT {
467 PACKED_TYPEDEF_STRUCT {
470 #if defined(FEATURE_ADVERTISER) 476 #if defined(FEATURE_SCAN_RESPONSE) 481 #if defined(FEATURE_SCANNER) 489 #if defined(FEATURE_MONITOR) 492 uint16 monitorDuration;
503 PACKED_TYPEDEF_STRUCT {
void uble_processMsg(void)
Let the Micro Stack process the queued messages.
bStatus_t uble_registerAntSwitchCB(ubleAntSwitchCB_t pfnAntSwitchCB)
Register callback for antenna switch.
void uble_resetAddr(void)
Make BD Addr revert to Random Static Address if exists or Public Address otherwise.
bStatus_t uble_stackInit(ubleAddrType_t addrType, uint8 *pStaticAddr, ublePostEvtProxyCB_t pfnPostEvtProxyCB, uint8 timeCritical)
Initialize Micro BLE Stack.
bStatus_t uble_getParameter(uint8 param, void *pValue)
Get a Micro BLE Stack parameter.
void(* ubleProcessMsg_t)(ubleEvtMsg_t *pEvtMsg)
Function to process event messages destined to the calle module.
Definition: uble.h:461
void(* ubleAntSwitchCB_t)(void)
Type of the callback to switch antenna in the application.
Definition: uble.h:456
#define UBLE_MAX_ADVDATA_LEN
Max Advertising Data Length.
Definition: uble.h:401
uint8 ubleEvt_t
Micro BLE Stack Event.
Definition: uble.h:420
bStatus_t uble_setParameter(uint8 param, uint8 len, void *pValue)
Set a Micro BLE Stack parameter.
uint8 ubleMsg_t
Type of Micro BLE Stack message.
Definition: uble.h:429
Status_t bStatus_t
BLE Generic Status return.
Definition: bcomdef.h:227
uint8 ubleEvtDst_t
Recipient of Micro BLE Stack Event.
Definition: uble.h:417
void(* ublePostEvtProxyCB_t)(void)
Type of the callback to have uble_processMsg called in the application task context.
Definition: uble.h:449
uint8 ubleAddrType_t
Address Type.
Definition: uble.h:414
bStatus_t uble_getAddr(ubleAddrType_t addrType, uint8 *pAddr)
Retrieve the address corresponding to the given address type.
bStatus_t uble_checkAddr(ubleAddrType_t addrType, uint8 *pAddr)
Check if the given address is valid.
This file contains configurable variables for the Micro BLE Stack radio.