Implementation functions
C wrappers for the user-supplied back-end primitives. More...
Functions Index
| void | micro_os_plus_trace_flush (void) |
|
Flush the trace output channel. More... | |
| void | micro_os_plus_trace_initialise (void) |
|
Initialise the trace output channel. More... | |
| ssize_t | micro_os_plus_trace_write (const void *buf, size_t nbyte) |
|
Write the given number of bytes to the trace output channel. More... | |
Description
C wrappers for the user-supplied back-end primitives.
These functions may be invoked from C projects to execute actions specific to the implementation.
Functions
micro_os_plus_trace_flush()
|
Flush the trace output channel.
- Parameters
None.
- Returns
Nothing.
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.
Declaration at line 112 of file trace-c-api.h, definition at line 58 of file trace-c-api.cpp.
micro_os_plus_trace_initialise()
|
Initialise the trace output channel.
- Parameters
None.
- Returns
Nothing.
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).
Declaration at line 73 of file trace-c-api.h, definition at line 46 of file trace-c-api.cpp.
Reference micro_os_plus::trace::detail::tracer< T >::initialise.
micro_os_plus_trace_write()
|
Write the given number of bytes to the trace output channel.
- Parameters
-
buf An array of bytes.
nbyte The number of bytes in the array.
- Returns
The number of bytes actually written, or -1 if error.
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.
Declaration at line 92 of file trace-c-api.h, definition at line 52 of file trace-c-api.cpp.
Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.17.0.