0.01.00
debug_uart.h File Reference

Note: This is NOT a public thread API, and this header file is NOT installed as part of OpenThread, this is an pseudo-internal debug feature usable by developers during the course of development. More...

Go to the source code of this file.

Functions

void otPlatDebugUart_printf (const char *fmt,...)
 Standard printf() to the debug uart with no log decoration. More...
 
void otPlatDebugUart_vprintf (const char *fmt, va_list ap)
 Standard vprintf() to the debug uart, with no log decoration. More...
 
void otPlatDebugUart_putchar_raw (int the_byte)
 Platform specific write single byte to Debug Uart This should not perform CR/LF mapping. More...
 
int otPlatDebugUart_kbhit (void)
 Poll/test debug uart if a key has been pressed. More...
 
int otPlatDebugUart_getc (void)
 Poll/Read a byte from the debug uart. More...
 
void otPlatDebugUart_putchar (int the_byte)
 Write byte to the uart, expand cr/lf as need. More...
 
void otPlatDebugUart_puts (const char *s)
 identical to "man 3 puts" - terminates with lf Which is then mapped to cr/lf as required More...
 
void otPlatDebugUart_write_bytes (const uint8_t *pBytes, int nBytes)
 Write N bytes to the UART, mapping cr/lf. More...
 
void otPlatDebugUart_puts_no_nl (const char *s)
 puts() without a terminal newline. More...
 
otError otPlatDebugUart_logfile (const char *filename)
 Some platforms (posix) can log to a file. More...
 

Detailed Description

Note: This is NOT a public thread API, and this header file is NOT installed as part of OpenThread, this is an pseudo-internal debug feature usable by developers during the course of development.

This implements a very basic debug uart useful for logging messages when the primary uart is already engaged (example the NCP) and encapsulating logs is not practical.

Implementation Notes:

Only 3 functions are required to be implemented by the platform. see/search for the word MUST in the comments below.

The other functions (without MUST in the comment) are WEAK symbols that can optionally be overridden by the platform or the application.

Many of the other functions are simply convenience functions to aid a developer during their normal course of work and are not intended to be present, or used in production system.