TI BLE-Stack for Bluetooth 4.2 API Documentation  3.01.00.07
Modules | Files | Functions
Stack Base

Modules

 Micro BLE Stack Callbacks
 
 Micro BLE Stack Constants
 
 Micro BLE Stack Structures
 

Files

file  uble.h
 This file contains configuration, initialization, and parameter management of Micro BLE Stack. It also contains interfacing between Micro BLE Stack and the application.
 

Functions

bStatus_t uble_checkAddr (ubleAddrType_t addrType, uint8 *pAddr)
 Check if the given address is valid. More...
 
bStatus_t uble_getAddr (ubleAddrType_t addrType, uint8 *pAddr)
 Retrieve the address corresponding to the given address type. More...
 
bStatus_t uble_getParameter (uint8 param, void *pValue)
 Get a Micro BLE Stack parameter. More...
 
void uble_processMsg (void)
 Let the Micro Stack process the queued messages. More...
 
bStatus_t uble_registerAntSwitchCB (ubleAntSwitchCB_t pfnAntSwitchCB)
 Register callback for antenna switch. More...
 
void uble_resetAddr (void)
 Make BD Addr revert to Random Static Address if exists or Public Address otherwise.
 
bStatus_t uble_setParameter (uint8 param, uint8 len, void *pValue)
 Set a Micro BLE Stack parameter. More...
 
bStatus_t uble_stackInit (ubleAddrType_t addrType, uint8 *pStaticAddr, ublePostEvtProxyCB_t pfnPostEvtProxyCB, uint8 timeCritical)
 Initialize Micro BLE Stack. More...
 

Detailed Description

Function Documentation

§ uble_checkAddr()

bStatus_t uble_checkAddr ( ubleAddrType_t  addrType,
uint8 *  pAddr 
)

Check if the given address is valid.

Parameters
addrType- UBLE_ADDRTYPE_PUBLIC , UBLE_ADDRTYPE_STATIC , UBLE_ADDRTYPE_NONRESOLVABLE , or UBLE_ADDRTYPE_RESOLVABLE
pAddr- pointer to where the address to check resides
Returns
SUCCESS
INVALIDPARAMETER
FAILURE

§ uble_getAddr()

bStatus_t uble_getAddr ( ubleAddrType_t  addrType,
uint8 *  pAddr 
)

Retrieve the address corresponding to the given address type.

Parameters
addrType- UBLE_ADDRTYPE_PUBLIC , UBLE_ADDRTYPE_STATIC or UBLE_ADDRTYPE_BD
pAddrpointer to memory location to return address. This should be a uint8_t[6]
Returns
SUCCESS
INVALIDPARAMETER
FAILURE

§ uble_getParameter()

bStatus_t uble_getParameter ( uint8  param,
void *  pValue 
)

Get a Micro BLE Stack parameter.

Parameters
param- parameter ID: Micro BLE Stack Parameters
pValue- pointer to location to get the value. This is dependent on the parameter ID and WILL be cast to the appropriate data type (example: data type of uint16 will be cast to uint16 pointer).
Returns
SUCCESS
INVALIDPARAMETER

§ uble_processMsg()

void uble_processMsg ( void  )

Let the Micro Stack process the queued messages.

Warning
The application MUST call this function when it process the event posted by the stack event proxy function registered through uble_stackInit

§ uble_registerAntSwitchCB()

bStatus_t uble_registerAntSwitchCB ( ubleAntSwitchCB_t  pfnAntSwitchCB)

Register callback for antenna switch.

Parameters
pfnAntSwitchCB- application antenna switch callback
Returns
SUCCESS

§ uble_setParameter()

bStatus_t uble_setParameter ( uint8  param,
uint8  len,
void *  pValue 
)

Set a Micro BLE Stack parameter.

Parameters
param- parameter ID: Micro BLE Stack Parameters
len- length of data to write
pValue- pointer to data to write. This is dependent on the parameter ID and WILL be cast to the appropriate data type (example: data type of uint16 will be cast to uint16 pointer).
Returns
SUCCESS
INVALIDPARAMETER
bleInvalidRange

§ uble_stackInit()

bStatus_t uble_stackInit ( ubleAddrType_t  addrType,
uint8 *  pStaticAddr,
ublePostEvtProxyCB_t  pfnPostEvtProxyCB,
uint8  timeCritical 
)

Initialize Micro BLE Stack.

Parameters
addrType- Micro BLE Stack Address Types
Type of the address which the device will use initially. Either UBLE_ADDRTYPE_PUBLIC or UBLE_ADDRTYPE_STATIC . If addrType is UBLE_ADDRTYPE_PUBLIC , the public address which is stored in CCFG preferably or in FCFG otherwise will be used for BD Addr. If addrType is UBLE_ADDRTYPE_STATIC , BD Addr will depend on pBDAddr.
pStaticAddr- If this is NULL and addrType is UBLE_ADDRTYPE_STATIC , a random static address will be generated by the stack and will be used for BD Address. If this is not NULL and addrType is UBLE_ADDRTYPE_STATIC , the 6 byte-long data pointed to by pBDAddr will be used for BD Address as the random static address.
pfnPostEvtProxyCB- Callback to trigger a context switch to the application task so that the messages queued by the stack can be processed by uble_processMsg in the application task context.
Warning
This callback MUST be provided by the application. The role of the callback is to post a RTOS event or semaphore to the application itself so that when the application task is activated it can call uble_processMsg in the application task context.
Parameters
timeCritical- rf transmit operation. For strict timing on the transmission, set value to RF_TIME_CRITICAL. For relaxed timing on the transmission set value to RF_TIME_RELAXED.
Returns
SUCCESS - success
INVALIDPARAMETER - addrType is invalid or pfnPostEvtProxyCB is NULL
Copyright 2017, Texas Instruments Incorporated