@@ -136,7 +136,7 @@ struct ble_adv_evt {
136136 union {
137137 /** @ref BLE_ADV_EVT_ERROR event data. */
138138 struct {
139- int reason ;
139+ uint32_t reason ;
140140 } error ;
141141 };
142142};
@@ -256,19 +256,19 @@ void ble_adv_on_ble_evt(const ble_evt_t *ble_evt, void *ble_adv);
256256 * @param[in] ble_adv BLE advertising instance.
257257 * @param[in] ble_adv_config Initialization configuration.
258258 *
259- * @retval 0 On success.
260- * @retval -FAULT If @p ble_adv or @p ble_adv_config are @c NULL.
261- * @retval -EINVAL If the configuration @p ble_adv_config is invalid.
259+ * @retval NRF_SUCCESS On success.
260+ * @retval NRF_ERROR_NULL If @p ble_adv or @p ble_adv_config are @c NULL.
261+ * @retval NRF_ERROR_INVALID_PARAM If the configuration @p ble_adv_config is invalid.
262262 */
263- int ble_adv_init (struct ble_adv * ble_adv , struct ble_adv_config * ble_adv_config );
263+ uint32_t ble_adv_init (struct ble_adv * ble_adv , struct ble_adv_config * ble_adv_config );
264264
265265/**
266266 * @brief Set the connection configuration tag used for connections.
267267 *
268268 * @param[in] ble_adv BLE advertising instance.
269269 * @param[in] ble_cfg_tag Connection configuration tag.
270270 */
271- int ble_adv_conn_cfg_tag_set (struct ble_adv * ble_adv , uint8_t ble_cfg_tag );
271+ uint32_t ble_adv_conn_cfg_tag_set (struct ble_adv * ble_adv , uint8_t ble_cfg_tag );
272272
273273/**
274274 * @brief Start advertising in given mode.
@@ -279,12 +279,12 @@ int ble_adv_conn_cfg_tag_set(struct ble_adv *ble_adv, uint8_t ble_cfg_tag);
279279 * @param[in] ble_adv BLE advertising instance.
280280 * @param[in] mode Desired advertising mode.
281281 *
282- * @retval 0 On success.
283- * @retval -EPERM Library is not initialized.
284- * @retval -EFAULT @p ble_adv is @c NULL.
285- * @retval -EINVAL Invalid parameters.
282+ * @retval NRF_SUCCESS On success.
283+ * @retval NRF_ERROR_INVALID_STATE Library is not initialized.
284+ * @retval NRF_ERROR_NULL @p ble_adv is @c NULL.
285+ * @retval NRF_ERROR_INVALID_PARAM Invalid parameters.
286286 */
287- int ble_adv_start (struct ble_adv * ble_adv , enum ble_adv_mode mode );
287+ uint32_t ble_adv_start (struct ble_adv * ble_adv , enum ble_adv_mode mode );
288288
289289/**
290290 * @brief Set the peer address for directed advertising.
@@ -296,12 +296,12 @@ int ble_adv_start(struct ble_adv *ble_adv, enum ble_adv_mode mode);
296296 * @param[in] p_advertising Advertising Module instance.
297297 * @param[in] p_peer_addr Pointer to a peer address.
298298 *
299- * @retval 0 On success.
300- * @retval -EPERM Library is not initialized.
301- * @retval -EFAULT @p ble_adv is @c NULL.
302- * @retval -EINVAL Invalid parameters.
299+ * @retval NRF_SUCCESS On success.
300+ * @retval NRF_ERROR_INVALID_STATE Library is not initialized.
301+ * @retval NRF_ERROR_NULL @p ble_adv is @c NULL.
302+ * @retval NRF_ERROR_INVALID_PARAM Invalid parameters.
303303 */
304- int ble_adv_peer_addr_reply (struct ble_adv * ble_adv , const ble_gap_addr_t * peer_addr );
304+ uint32_t ble_adv_peer_addr_reply (struct ble_adv * ble_adv , const ble_gap_addr_t * peer_addr );
305305
306306/**
307307 * @brief Set a whitelist for fast and slow advertising.
@@ -315,14 +315,14 @@ int ble_adv_peer_addr_reply(struct ble_adv *ble_adv, const ble_gap_addr_t *peer_
315315 * @param[in] gap_irks The list of peer IRK to whitelist.
316316 * @param[in] irk_cnt The number of peer IRK to whitelist.
317317 *
318- * @retval 0 On success.
319- * @retval -EPERM Library is not initialized.
320- * @retval -EFAULT @p ble_adv is @c NULL.
321- * @retval -EINVAL Invalid parameters.
318+ * @retval NRF_SUCCESS On success.
319+ * @retval NRF_ERROR_INVALID_STATE Library is not initialized.
320+ * @retval NRF_ERROR_NULL @p ble_adv is @c NULL.
321+ * @retval NRF_ERROR_INVALID_PARAM Invalid parameters.
322322 */
323- int ble_adv_whitelist_reply (struct ble_adv * ble_adv ,
324- const ble_gap_addr_t * gap_addrs , uint32_t addr_cnt ,
325- const ble_gap_irk_t * gap_irks , uint32_t irk_cnt );
323+ uint32_t ble_adv_whitelist_reply (struct ble_adv * ble_adv ,
324+ const ble_gap_addr_t * gap_addrs , uint32_t addr_cnt ,
325+ const ble_gap_irk_t * gap_irks , uint32_t irk_cnt );
326326
327327/**
328328 * @brief Restart advertising without whitelist.
@@ -332,11 +332,12 @@ int ble_adv_whitelist_reply(struct ble_adv *ble_adv,
332332 *
333333 * @param[in] ble_adv Advertising Module instance.
334334 *
335- * @retval 0 On success.
336- * @retval -EPERM Library is not initialized.
337- * @retval -EFAULT @p ble_adv is @c NULL.
335+ * @retval NRF_SUCCESS On success.
336+ * @retval NRF_ERROR_INVALID_STATE Library is not initialized.
337+ * @retval NRF_ERROR_NULL @p ble_adv is @c NULL.
338+ * @retval NRF_ERROR_INVALID_PARAM Invalid advertising parameters.
338339 */
339- int ble_adv_restart_without_whitelist (struct ble_adv * ble_adv );
340+ uint32_t ble_adv_restart_without_whitelist (struct ble_adv * ble_adv );
340341
341342/**@brief Function for updating advertising data.
342343 *
@@ -355,9 +356,9 @@ int ble_adv_restart_without_whitelist(struct ble_adv *ble_adv);
355356 * @retval @ref NRF_SUCCESS or any error from @ref ble_advdata_encode or
356357 * @ref sd_ble_gap_adv_set_configure().
357358 */
358- int ble_adv_data_update (struct ble_adv * ble_adv ,
359- const struct ble_adv_data * adv ,
360- const struct ble_adv_data * sr );
359+ uint32_t ble_adv_data_update (struct ble_adv * ble_adv ,
360+ const struct ble_adv_data * adv ,
361+ const struct ble_adv_data * sr );
361362
362363#ifdef __cplusplus
363364}
0 commit comments