BLE_GAP_SetPeriAdvParams
C
uint16_t BLE_GAP_SetPeriAdvParams(BLE_GAP_PeriAdvParams_T *p_periAdvParams);
Description
Configures periodic advertising parameters.
Note
This API can be called at any time and is part of the extended advertising feature. It is disallowed if any legacy advertising feature API has been issued prior to this call. See Categories of advertising APIs and events for details on advertising APIs. Initialization with BLE_GAP_AdvInit, BLE_GAP_ExtAdvInit, and BLE_GAP_PeriodicAdvInit is required before using this API. If periodic advertising is currently enabled for the specified advertising set, the new data will be used in subsequent periodic advertising events. If a periodic advertising event is in progress when this command is issued, either the old or new data may be used for that event.
Parameters
Parameter | Description |
---|---|
[in] p_periAdvParams | Pointer to a BLE_GAP_PeriAdvParams_T structure containing the periodic advertising data. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully sets periodic advertising parameters. |
MBA_RES_OOM | Internal memory allocation failure occurred. |
MBA_RES_INVALID_PARA | The parameters provided are invalid. |
MBA_RES_COMMAND_DISALLOWED | Command disallowed due to a conflicting operation or state. |
MBA_RES_UNKNOWN_ADV_ID | Unknown advertising identifier. |