|
diag-trace 5.0.0
µOS++ Tracing Infrastructure
|
C wrappers for the user-supplied back-end primitives. More...
Functions | |
| void | micro_os_plus_trace_flush (void) |
| Flush the trace output channel. | |
| void | micro_os_plus_trace_initialise (void) |
| Initialise the trace output channel. | |
| ssize_t | micro_os_plus_trace_write (const void *buf, size_t nbyte) |
| Write the given number of bytes to the trace output channel. | |
These functions may be invoked from C projects to execute actions specific to the implementation.
| void micro_os_plus_trace_flush | ( | void | ) |
For buffered output channels, this function must drain any internally buffered data to the output device. For unbuffered or character-mode channels (e.g. ITM), the body can be left empty. No assumptions are made about thread safety or re-entrancy; the caller is responsible for ensuring that concurrent calls do not occur.
Definition at line 58 of file trace-c-api.cpp.
References micro_os_plus::trace::detail::tracer< T >::flush().
| void micro_os_plus_trace_initialise | ( | void | ) |
This function is called during startup, as early as possible, to enable the trace channel. The user must provide a definition of this function that configures the underlying output device (e.g. a semihosting channel, or an ITM port).
Definition at line 46 of file trace-c-api.cpp.
References micro_os_plus::trace::detail::tracer< T >::initialise().
| ssize_t micro_os_plus_trace_write | ( | const void * | buf, |
| size_t | nbyte ) |
| buf | An array of bytes. |
| nbyte | The number of bytes in the array. |
This is the core output primitive. The user must provide a definition of this function. The return value must reflect the number of bytes actually transferred to the output device, which may be less than nbyte if the device is full or an error occurs. A return value of -1 signals an error; any non-negative value is treated as a byte count by the higher-level functions.
Definition at line 52 of file trace-c-api.cpp.
References micro_os_plus::trace::detail::tracer< T >::write().