TI BLE-Stack for Bluetooth 4.2 API Documentation  3.01.00.07
Data Structures | Typedefs
Multi GAPRole Callbacks

Data Structures

struct  gapRolesCBs_t
 Multi GAPRole Callback structure. More...
 

Typedefs

typedef void(* paramUpdateAppDecision_t) (gapUpdateLinkParamReq_t *pReq, gapUpdateLinkParamReqReply_t *pRsp)
 Callback for the app to decide on a parameter update request. More...
 
typedef uint8_t(* passThroughToApp_t) (gapMultiRoleEvent_t *pEvent)
 Multi Event Callback Function. More...
 

Detailed Description

These are functions whose pointers are passed from the application to the GAPRole so that the GAPRole can send events to the application

Typedef Documentation

§ paramUpdateAppDecision_t

typedef void(* paramUpdateAppDecision_t) (gapUpdateLinkParamReq_t *pReq, gapUpdateLinkParamReqReply_t *pRsp)

Callback for the app to decide on a parameter update request.

This callback will be used if the GAP_UPDATE_LINK_PARAM_REQ_EVENT parameter is set to GAPROLE_LINK_PARAM_UPDATE_APP_DECIDES

Parameters
pReqPointer to param update request
pRspPointer to param update response.

§ passThroughToApp_t

typedef uint8_t(* passThroughToApp_t) (gapMultiRoleEvent_t *pEvent)

Multi Event Callback Function.

This callback is used by the Multi GAPRole to forward GAP_Events to the application.

If the message is successfully queued to the application for later processing, FALSE is returned because the application deallocates it later. Consider the following state change event from multi_role as an example of this:

static void multi_role_processAppMsg(mrEvt_t *pMsg)
{
switch (pMsg->event)
{
case MR_STATE_CHANGE_EVT:
multi_role_processStackMsg((ICall_Hdr *)pMsg->pData);
// Free the stack message
ICall_freeMsg(pMsg->pData);
break;

If the message is not successfully queued to the application, TRUE is returned so that the GAPRole can deallocate the message. If the heap has enough room, the message must always be successfully enqueued.

Parameters
pEventPointer to event structure
Returns
TRUE if safe to deallocate event message
FALSE otherwise
Copyright 2017, Texas Instruments Incorporated