BLE_GAP_SetPeriAdvRxEnable
C
uint16_t BLE_GAP_SetPeriAdvRxEnable(uint16_t syncHandle, bool enable);
Description
Enables or disables reports for the periodic advertising train identified by the "syncHandle".
Note
This API is part of the extended advertising feature set and is incompatible with legacy advertising APIs. See Categories of advertising APIs and events for details on advertising APIs. Initialization with BLE_GAP_ScanInit, BLE_GAP_ExtScanInit, and BLE_GAP_SyncInit is required before using this API.
Events generated
BLE_GAP_EVT_PERI_ADV_REPORT is generated when reporting is enabled.
Parameters
Parameter | Description |
---|---|
[in] syncHandle | Identity of the periodic advertising train. |
[in] enable | Set to true to enable reports, or false to disable them. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully enables or disables for the periodic advertising train. |
MBA_RES_OOM | Internal memory allocation failure occurred. |
MBA_RES_COMMAND_DISALLOWED | Command disallowed due to a conflicting operation or state. |
MBA_RES_UNKNOWN_ADV_ID | Unknown advertising identifier. |