![]() |
![]() |
|
BLE-Stack APIs
3.00.00
|
This file contains the interface to the Micro Link Layer.
Go to the source code of this file.
Macros | |
| #define | BLE_TO_RAT 2500 |
| #define | MS_TO_RAT 4000 |
| #define | MS_TO_SYSTICK (1000 / Clock_tickPeriod) |
| #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) |
| #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 |
| #define | UB_EVTDST_LL 0 |
| #define | UB_MAX_ADV_INTERVAL 16384 |
| 10.24 seconds | |
| #define | UB_MAX_ADVDATA_LEN B_MAX_ADV_LEN |
| Max Advertising Data Length. | |
| #define | UB_MAX_CHANNEL_MAP UB_ADV_CHAN_ALL |
| #define | UB_MAX_TX_POWER TX_POWER_5_DBM |
| 5 dBm | |
| #define | UB_MIN_ADV_INTERVAL 160 |
| 100 milliseconds | |
| #define | UB_MIN_CHANNEL_MAP UB_ADV_CHAN_37 |
| #define | UB_MIN_TX_POWER TX_POWER_MINUS_21_DBM |
| -21 dBm | |
| #define | UB_NUM_EVTDST 2 |
| #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_RFPRIORITY (UB_PARAM_COMMON_START+0) |
| Priority used for RF command scheduling. More... | |
| #define | UB_PARAM_RFTIMECRIT (UB_PARAM_COMMON_START+1) |
| Whether or not to allow delayed advertising out of periodicity. More... | |
| #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+2) |
| TX Power. More... | |
| #define | UB_TX_POWER_INVALID 0xFFFF |
| Invalid TX Power Register value. | |
| #define | US_TO_RAT 4 |
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) |
| Initialize Micro BLE Stack. More... | |
Variables | |
| ubEvtDst_t | dst |
| ubEvt_t | evt |
| ubMsg_t | msg [] |
| PACKED_TYPEDEF_STRUCT | |
| Type of Micro BLE Stack event header. More... | |
| ubEvtHdr_t | |
| ubEvtMsg_t | |