BLE_GAP_EnableOneTimeAdv

C

uint16_t BLE_GAP_EnableOneTimeAdv(uint8_t option);

Description

Starts a one-time advertising event.

Note

This API is part of the legacy advertising feature set. It will be disallowed if any API from the extended advertising feature set 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. If the option is set to BLE_GAP_ADV_OPTION_STORE_PARAMS, the APIs BLE_GAP_SetAdvParams, BLE_GAP_SetAdvData, or BLE_GAP_SetScanRspData must be called beforehand to set the appropriate parameters.

Parameters

ParameterDescription
[in] optionOption for one time advertising. See Advertising options.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully starts advertising.
MBA_RES_OOMInternal memory allocation failure occurred.
MBA_RES_INVALID_PARAThe parameters provided are invalid.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed when extended advertising feature is in use.