Functions

GAP Peripheral Role API Functions

Functions

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

Function Documentation

bStatus_t GAPRole_GetParameter ( uint16  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".

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 will be cast to uint16 pointer).
Returns:
SUCCESS or INVALIDPARAMETER (invalid paramID)
void GAPRole_RegisterAppCBs ( gapRolesParamUpdateCB_t *  pParamUpdateCB  ) 

Register application's callbacks.

Parameters:
pParamUpdateCB - pointer to param update callback.
Returns:
none
bStatus_t GAPRole_SendUpdateParam ( uint16  minConnInterval,
uint16  maxConnInterval,
uint16  latency,
uint16  connTimeout,
uint8  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, bleNotConnected or bleInvalidRange
bStatus_t GAPRole_SetParameter ( uint16  param,
uint8  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" and the "pValue" field must point to a "uint16".

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 will be cast to uint16 pointer).
Returns:
SUCCESS or INVALIDPARAMETER (invalid paramID)
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
bStatus_t GAPRole_TerminateConnection ( void   ) 

Terminates the existing connection.

Returns:
SUCCESS or bleIncorrectMode