File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
include/bm/bluetooth/services
subsys/bluetooth/services/ble_bas Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,10 @@ struct ble_bas {
179179 *
180180 * @retval NRF_SUCCESS On success.
181181 * @retval NRF_ERROR_NULL If @p bas or @p bas_config are @c NULL.
182- * @retval NRF_ERROR_INVALID_PARAM Invalid parameters.
182+ * @return This function additionally may return an error from these SoftDevice functions:
183+ * - @ref sd_ble_gatts_service_add(),
184+ * - @ref sd_ble_gatts_characteristic_add(),
185+ * - @ref sd_ble_gatts_descriptor_add().
183186 */
184187uint32_t ble_bas_init (struct ble_bas * bas , const struct ble_bas_config * bas_config );
185188
Original file line number Diff line number Diff line change @@ -144,14 +144,14 @@ uint32_t ble_bas_init(struct ble_bas *bas, const struct ble_bas_config *cfg)
144144 & bas -> service_handle );
145145 if (nrf_err ) {
146146 LOG_ERR ("Failed to add battery service, nrf_error %#x" , nrf_err );
147- return NRF_ERROR_INVALID_PARAM ;
147+ return nrf_err ;
148148 }
149149
150150 /* Add battery level characteristic */
151151 nrf_err = battery_level_char_add (bas , cfg );
152152 if (nrf_err ) {
153153 LOG_ERR ("Failed to add battery service characteristic, nrf_error %#x" , nrf_err );
154- return NRF_ERROR_INVALID_PARAM ;
154+ return nrf_err ;
155155 }
156156
157157 /* Add reference descriptor if present */
@@ -160,7 +160,7 @@ uint32_t ble_bas_init(struct ble_bas *bas, const struct ble_bas_config *cfg)
160160 if (nrf_err ) {
161161 LOG_ERR ("Failed to add report reference descriptor, nrf_error %#x" ,
162162 nrf_err );
163- return NRF_ERROR_INVALID_PARAM ;
163+ return nrf_err ;
164164 }
165165 }
166166
You can’t perform that action at this time.
0 commit comments