Skip to content

Commit

Permalink
lib: pdn: doc: Clarify function return values
Browse files Browse the repository at this point in the history
Expand on the return values of callback reg/dereg functions.

Signed-off-by: Håvard Vermeer <[email protected]>
  • Loading branch information
nordic-hani committed Jan 15, 2025
1 parent edc4bd9 commit dbda116
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/modem/pdn.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ int pdn_default_apn_get(char *buf, size_t len);
*
* @param cb The PDN event handler.
*
* @return int Zero on success or a negative errno otherwise.
* @retval 0 Callback registered successfully, or the callback is already registered.
* @retval -EFAULT The provided cb parameter was \c NULL.
* @retval -ENOMEM Insufficient heap to allocate the PDP context.
*/
int pdn_default_ctx_cb_reg(pdn_event_handler_t cb);

Expand All @@ -271,7 +273,10 @@ int pdn_default_ctx_cb_reg(pdn_event_handler_t cb);
*
* @param cb The PDN event handler.
*
* @return int Zero on success or a negative errno otherwise.
* @retval 0 Callback deregistered successfully.
* @retval -EFAULT The provided cb parameter was \c NULL.
* @retval -EINVAL PDP context with the provided callback was not found. This can be returned if
* the callback was not registered upon calling this function.
*/
int pdn_default_ctx_cb_dereg(pdn_event_handler_t cb);

Expand Down

0 comments on commit dbda116

Please sign in to comment.