![]() |
0.01.00
|
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... | |
| int otPlatDebugUart_getc | ( | void | ) |
Poll/Read a byte from the debug uart.
This function MUST be implemented by the platform
| (negative) | no data available, |
| (0x00..0x0ff) | data byte value |
| int otPlatDebugUart_kbhit | ( | void | ) |
Poll/test debug uart if a key has been pressed.
It would be common to a stub function that returns 0.
This function MUST be implemented by the platform
| zero | - nothing ready |
| nonzero | - otPlatDebugUart_getc() will succeed. |
| otError otPlatDebugUart_logfile | ( | const char * | filename | ) |
Some platforms (posix) can log to a file.
Platforms that desire this MUST provide an implementation.
| void otPlatDebugUart_printf | ( | const char * | fmt, |
| ... | |||
| ) |
Standard printf() to the debug uart with no log decoration.
| [in] | fmt | printf formatter text |
This is a debug convenience function that is not intended to be used in anything other then "debug scenarios" by a developer.
lf -> cr/lf mapping is automatically handled via otPlatDebugUart_putchar()
This is a WEAK symbol that can easily be overridden as needed.
| void otPlatDebugUart_putchar | ( | int | the_byte | ) |
Write byte to the uart, expand cr/lf as need.
A WEAK default implementation is provided that can be overridden as needed.
| [in] | the_byte | the byte to transmit |
| void otPlatDebugUart_putchar_raw | ( | int | the_byte | ) |
Platform specific write single byte to Debug Uart This should not perform CR/LF mapping.
This function MUST be implemented by the platform
| [in] | the_byte | what to transmit |
| void otPlatDebugUart_puts | ( | const char * | s | ) |
identical to "man 3 puts" - terminates with lf Which is then mapped to cr/lf as required
A WEAK default implementation is provided that can be overridden as needed.
| [in] | s | the string to print with a lf at the end |
| void otPlatDebugUart_puts_no_nl | ( | const char * | s | ) |
puts() without a terminal newline.
see: "man 3 puts", without a adding a terminal lf
| [in] | s | the string to print without a lf at the end |
Note, the terminal "lf" mapped to cr/lf via the function otPlatDebugUart_putchar()
| void otPlatDebugUart_vprintf | ( | const char * | fmt, |
| va_list | ap | ||
| ) |
Standard vprintf() to the debug uart, with no log decoration.
| [in] | fmt | printf formatter text |
| [in] | ap | va_list value for print parameters. |
Implementation limitation: this formats the text into a purposely small text buffer on the stack, thus long messages may be truncated.
This is a WEAK symbol that can easily be overridden as needed.
For example, some platforms might override this via a non-WEAK symbol because the platform provides a UART_vprintf() like function that can handle an arbitrary length output.
| void otPlatDebugUart_write_bytes | ( | const uint8_t * | pBytes, |
| int | nBytes | ||
| ) |
Write N bytes to the UART, mapping cr/lf.
| [in] | pBytes | pointer to bytes to transmit. |
| [in] | nBytes | how many bytes to transmit. |