BLE-Stack APIs  3.00.00
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs
Multi GAPRole Callbacks

Data Structures

struct  gapRolesCBs_t
 Peripheral GAPRole Callback structure. More...
 

Typedefs

typedef void(* paramUpdateAppDecision_t )(gapUpdateLinkParamReq_t *pReq, gapUpdateLinkParamReqReply_t *pRsp)
 
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

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 2016, Texas Instruments Incorporated