BLE_GAP_SetAdvData
C
uint16_t BLE_GAP_SetAdvData(BLE_GAP_AdvDataParams_T *p_advData);
Description
Sets advertising data from the input "p_advData".
Note
If advertising is currently enabled, the new data will be used in subsequent advertising events. If an advertising event is in progress when this command is issued, the new data may not be used for that event. This API is part of the legacy advertising feature and will be disallowed if any extended advertising feature API has been used prior to this call. See Categories of advertising APIs and events for details on advertising APIs. The BLE_GAP_AdvInit function must be called prior to using this API.
Parameters
Parameter | Description |
---|---|
[in] p_advData | Pointer to the structure containing advertising data to be set. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully sets advertising data. |
MBA_RES_OOM | Internal memory allocation failure occurred. |
MBA_RES_INVALID_PARA | Invalid parameters, if the advertising data length exceeds BLE_GAP_ADV_DATA_LEN. |
MBA_RES_COMMAND_DISALLOWED | Command disallowed when extended advertising feature is in use. |