TI BLE5-Stack API Documentation  1.01.12.00
Macros
GapAdv Event IDs

Macros

#define GAP_EVT_ADV_DATA_TRUNCATED   (uint32_t)BV(6)
 
#define GAP_EVT_ADV_END   (uint32_t)BV(3)
 
#define GAP_EVT_ADV_END_AFTER_DISABLE   (uint32_t)BV(1)
 
#define GAP_EVT_ADV_EVT_MASK
 Mask for all advertising events. More...
 
#define GAP_EVT_ADV_REPORT   (uint32_t)BV(22)
 
#define GAP_EVT_ADV_REPORT_FULL   (uint32_t)BV(23)
 
#define GAP_EVT_ADV_SET_TERMINATED   (uint32_t)BV(4)
 
#define GAP_EVT_ADV_START   (uint32_t)BV(2)
 
#define GAP_EVT_ADV_START_AFTER_ENABLE   (uint32_t)BV(0)
 
#define GAP_EVT_INSUFFICIENT_MEMORY   (uint32_t)BV(31)
 A memory failure has occurred.
 
#define GAP_EVT_SCAN_DISABLED   (uint32_t)BV(17)
 
#define GAP_EVT_SCAN_DUR_ENDED   (uint32_t)BV(19)
 Scan duration has ended.
 
#define GAP_EVT_SCAN_ENABLED   (uint32_t)BV(16)
 Scanner has been enabled.
 
#define GAP_EVT_SCAN_EVT_MASK
 Mask for all scan events. More...
 
#define GAP_EVT_SCAN_INT_ENDED   (uint32_t)BV(20)
 
#define GAP_EVT_SCAN_PRD_ENDED   (uint32_t)BV(18)
 
#define GAP_EVT_SCAN_REQ_RECEIVED   (uint32_t)BV(5)
 
#define GAP_EVT_SCAN_WND_ENDED   (uint32_t)BV(21)
 Scan window has ended.
 

Detailed Description

These are received through the pfnGapCB_t registered in the GapAdv_create

See the individual event to see how pBuf in the pfnGapCB_t should be cast.

Macro Definition Documentation

§ GAP_EVT_ADV_DATA_TRUNCATED

#define GAP_EVT_ADV_DATA_TRUNCATED   (uint32_t)BV(6)

Sent when the advertising data is truncated due to the limited advertisement data length for connectable advertisements.

pBuf should be cast to GapAdv_truncData_t

§ GAP_EVT_ADV_END

#define GAP_EVT_ADV_END   (uint32_t)BV(3)

Sent after each advertisement (for legacy advertising) or at the end of each each advertisement set (for extended advertising)

pBuf should be cast to a uint8_t which will contain the advertising handle

§ GAP_EVT_ADV_END_AFTER_DISABLE

#define GAP_EVT_ADV_END_AFTER_DISABLE   (uint32_t)BV(1)

Sent after advertising stops due to a GapAdv_disable

pBuf should be cast to a uint8_t which will contain the advertising handle

§ GAP_EVT_ADV_EVT_MASK

#define GAP_EVT_ADV_EVT_MASK
Value:
GAP_EVT_ADV_END_AFTER_DISABLE | \
GAP_EVT_ADV_START | \
GAP_EVT_ADV_END | \
GAP_EVT_ADV_SET_TERMINATED | \
GAP_EVT_SCAN_REQ_RECEIVED | \
GAP_EVT_ADV_DATA_TRUNCATED | \
GAP_EVT_INSUFFICIENT_MEMORY)
#define GAP_EVT_ADV_START_AFTER_ENABLE
Definition: gap.h:199

Mask for all advertising events.

§ GAP_EVT_ADV_REPORT

#define GAP_EVT_ADV_REPORT   (uint32_t)BV(22)

An Adv or a ScanRsp has been received.

This event comes with a message of GapScan_Evt_AdvRpt_t. Application is responsible for freeing both the message and the message data (msg->pData).

§ GAP_EVT_ADV_REPORT_FULL

#define GAP_EVT_ADV_REPORT_FULL   (uint32_t)BV(23)

Maximum number of Adv reports have been recorded.

This event comes with a message of GapScan_Evt_AdvRpt_t.

§ GAP_EVT_ADV_SET_TERMINATED

#define GAP_EVT_ADV_SET_TERMINATED   (uint32_t)BV(4)

Sent when an advertisement set is terminated due to a connection establishment

pBuf should be cast to GapAdv_setTerm_t

§ GAP_EVT_ADV_START

#define GAP_EVT_ADV_START   (uint32_t)BV(2)

Sent at the beginning of each advertisement (for legacy advertising) or at the beginning of each each advertisement set (for extended advertising)

pBuf should be cast to a uint8_t which will contain the advertising handle

§ GAP_EVT_ADV_START_AFTER_ENABLE

#define GAP_EVT_ADV_START_AFTER_ENABLE   (uint32_t)BV(0)

Sent on the first advertisement after a GapAdv_enable

pBuf should be cast to a uint8_t which will contain the advertising handle

§ GAP_EVT_SCAN_DISABLED

#define GAP_EVT_SCAN_DISABLED   (uint32_t)BV(17)

Scanner has been disabled.

This event comes with a message of GapScan_Evt_End_t. Application is responsible for freeing the message.

§ GAP_EVT_SCAN_EVT_MASK

#define GAP_EVT_SCAN_EVT_MASK
Value:
GAP_EVT_SCAN_DISABLED | \
GAP_EVT_SCAN_PRD_ENDED | \
GAP_EVT_SCAN_DUR_ENDED | \
GAP_EVT_SCAN_INT_ENDED | \
GAP_EVT_SCAN_WND_ENDED | \
GAP_EVT_ADV_REPORT | \
GAP_EVT_ADV_REPORT_FULL | \
GAP_EVT_PRD_ADV_SYNC_ESTABLISHED | \
GAP_EVT_PRD_ADV_REPORT | \
GAP_EVT_PRD_ADV_SYNC_LOST | \
GAP_EVT_INSUFFICIENT_MEMORY)
#define GAP_EVT_SCAN_ENABLED
Scanner has been enabled.
Definition: gap.h:241

Mask for all scan events.

§ GAP_EVT_SCAN_INT_ENDED

#define GAP_EVT_SCAN_INT_ENDED   (uint32_t)BV(20)

Scan interval has ended.

Possibly a new scan interval and a new scan window have started.

§ GAP_EVT_SCAN_PRD_ENDED

#define GAP_EVT_SCAN_PRD_ENDED   (uint32_t)BV(18)

Scan period has ended.

Possibly a new scan period and a new scan duration have started.

§ GAP_EVT_SCAN_REQ_RECEIVED

#define GAP_EVT_SCAN_REQ_RECEIVED   (uint32_t)BV(5)

Sent when a scan request is received

pBuf should be cast to GapAdv_scanReqReceived_t

© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale