TI BLE Stack API Documentation  2.03.08
Functions
GAP Peripheral Role API Functions

Functions

bStatus_t GAPRole_SetParameter (uint16_t param, uint8_t len, void *pValue)
 Set a GAP Role parameter. More...
 
bStatus_t GAPRole_GetParameter (uint16_t param, void *pValue)
 Get a GAP Role parameter. More...
 
bStatus_t GAPRole_StartDevice (gapRolesCBs_t *pAppCallbacks)
 Does the device initialization. Only call this function once. More...
 
bStatus_t GAPRole_TerminateConnection (void)
 Terminates the existing connection. More...
 
bStatus_t GAPRole_SendUpdateParam (uint16_t minConnInterval, uint16_t maxConnInterval, uint16_t latency, uint16_t connTimeout, uint8_t handleFailure)
 Update the parameters of an existing connection. More...
 
void GAPRole_RegisterAppCBs (gapRolesParamUpdateCB_t *pParamUpdateCB)
 Register application's callbacks. More...
 

Detailed Description

Function Documentation

§ GAPRole_GetParameter()

bStatus_t GAPRole_GetParameter ( uint16_t  param,
void *  pValue 
)

Get a GAP Role parameter.

NOTE: You can call this function with a GAP Parameter ID and it will get a GAP Parameter. GAP Parameters are defined in (gap.h). Also, the "pValue" field must point to a "uint16_t".

Parameters
param- Profile parameter ID: GAP Role 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_t will be cast to uint16_t pointer).
Returns
SUCCESS or INVALIDPARAMETER (invalid paramID)

§ GAPRole_RegisterAppCBs()

void GAPRole_RegisterAppCBs ( gapRolesParamUpdateCB_t *  pParamUpdateCB)

Register application's callbacks.

Parameters
pParamUpdateCB- pointer to param update callback.
Returns
none

§ GAPRole_SendUpdateParam()

bStatus_t GAPRole_SendUpdateParam ( uint16_t  minConnInterval,
uint16_t  maxConnInterval,
uint16_t  latency,
uint16_t  connTimeout,
uint8_t  handleFailure 
)

Update the parameters of an existing connection.

Parameters
connInterval- the new connection interval
latency- the new slave latency
connTimeout- the new timeout value
handleFailure- what to do if the update does not occur. Method may choose to terminate connection, try again, or take no action
Returns
SUCCESS: operation was successful. INVALIDPARAMETER: Data can not fit into one packet. MSG_BUFFER_NOT_AVAIL: No HCI buffer is available. bleInvalidRange: bleIncorrectMode: invalid profile role. bleAlreadyInRequestedMode: already updating link parameters. bleNotConnected: Connection is down bleMemAllocError: Memory allocation error occurred. bleNoResources: No available resource

§ GAPRole_SetParameter()

bStatus_t GAPRole_SetParameter ( uint16_t  param,
uint8_t  len,
void *  pValue 
)

Set a GAP Role parameter.

NOTE: You can call this function with a GAP Parameter ID and it will set the GAP Parameter. GAP Parameters are defined in (gap.h). Also, the "len" field must be set to the size of a "uint16_t" and the "pValue" field must point to a "uint16_t".

Parameters
param- Profile parameter ID: GAP Role 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_t will be cast to uint16_t pointer).
Returns
SUCCESS or INVALIDPARAMETER (invalid paramID)

§ GAPRole_StartDevice()

bStatus_t GAPRole_StartDevice ( gapRolesCBs_t pAppCallbacks)

Does the device initialization. Only call this function once.

Parameters
pAppCallbacks- pointer to application callbacks.
Returns
SUCCESS or bleAlreadyInRequestedMode

§ GAPRole_TerminateConnection()

bStatus_t GAPRole_TerminateConnection ( void  )

Terminates the existing connection.

Returns
SUCCESS or bleIncorrectMode