logging: Clarify contract of log_output_func_t
The log_output_func_t backend function is supposed to either process or drop bytes and return the amount of those to the caller. Clarify this in the documentation. Fixes #12241 Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
6f011c95c4
commit
082cf7ac64
1 changed files with 5 additions and 1 deletions
|
@ -50,7 +50,11 @@ extern "C" {
|
||||||
* @param length Data length.
|
* @param length Data length.
|
||||||
* @param ctx User context.
|
* @param ctx User context.
|
||||||
*
|
*
|
||||||
* @return Number of bytes processed.
|
* @return Number of bytes processed, dropped or discarded.
|
||||||
|
*
|
||||||
|
* @note If the log output function cannot process all of the data, it is
|
||||||
|
* its responsibility to mark them as dropped or discarded by returning
|
||||||
|
* the corresponding number of bytes dropped or discarded to the caller.
|
||||||
*/
|
*/
|
||||||
typedef int (*log_output_func_t)(u8_t *buf, size_t size, void *ctx);
|
typedef int (*log_output_func_t)(u8_t *buf, size_t size, void *ctx);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue