|
CardSight 0.1.0
C API reference for the CardSight firmware and application
|
The console stream the log, the shell and the C library's stdout share. More...
#include <stddef.h>Go to the source code of this file.
Functions | |
| void | console_write (const char *data, size_t length) |
| Write bytes to the console. | |
| int | console_read (int timeout_ms) |
| Read one byte from the console. | |
| int | console_start_receive (void) |
| Start interrupt-driven console input. | |
The console stream the log, the shell and the C library's stdout share.
| int console_read | ( | int | timeout_ms | ) |
Read one byte from the console.
| timeout_ms | Milliseconds to wait for input. |
timeout_ms milliseconds, or -ENODEV when the receive side has not been started. | int console_start_receive | ( | void | ) |
Start interrupt-driven console input.
Creates the receive queue and connects the UART interrupt, so the receive side needs the kernel; call once the scheduler runs.
| void console_write | ( | const char * | data, |
| size_t | length ) |
Write bytes to the console.
Each newline is preceded by a carriage return so a terminal returns to column zero, then the byte is sent synchronously to the UART.
| data | Bytes to write; may contain any value. |
| length | Number of bytes in data. |