AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches
Debug: Logging Interface

Logging interface for the AFBR-S50 API. More...

Collaboration diagram for Debug: Logging Interface:

Functions

status_t print (const char *fmt_s,...)
 A printf-like function to print formatted data to an debugging interface.
 

Detailed Description

Logging interface for the AFBR-S50 API.


This interface provides logging utility functions. Defines a printf-like function that is used to print error and log messages.

Function Documentation

◆ print()

status_t print ( const char *  fmt_s,
  ... 
)

A printf-like function to print formatted data to an debugging interface.


Writes the C string pointed by fmt_t to an output. If format includes format specifiers (subsequences beginning with %), the additional arguments following fmt_t are formatted and inserted in the resulting string replacing their respective specifiers.

To enable the print functionality, an implementation of the function must be provided that maps the output to an interface like UART or a debugging console, e.g. by forwarding to standard printf() method.

Note
The implementation of this function is optional for the correct execution of the API. If not implemented, a weak implementation within the API will be used that does nothing. This will improve the performance but no error messages are logged.
The naming is different from the standard printf() on purpose to prevent builtin compiler optimizations.
Parameters
fmt_sThe usual print() format string.
...The usual print() parameters.
Returns
Returns the status (STATUS_OK on success).
Examples
01_simple_example.c, 01_simple_example_with_hal_self_test.c, 02_advanced_example.c, 02_advanced_example_with_hal_self_test.c, 03_high_speed_example.c, 04_multi_device_example.c, and 05_simple_example_debug.c.