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

Data Structures

struct  gapCentralRoleCB_t
 Central GAPRole Callback Structure. More...
 

Typedefs

typedef uint8_t(* pfnGapCentralRoleEventCB_t) (gapCentralRoleEvent_t *pEvent)
 Central 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

§ pfnGapCentralRoleEventCB_t

typedef uint8_t(* pfnGapCentralRoleEventCB_t) (gapCentralRoleEvent_t *pEvent)

Central Event Callback Function.

This callback is used by the Central GAPRole to forward GAP_Events to the application that it receives from the stack.

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 simple_central as an example of this:

static void SimpleBLECentral_processAppMsg(sbcEvt_t *pMsg)
{
switch (pMsg->hdr.event)
{
case SBC_STATE_CHANGE_EVT:
SimpleBLECentral_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