|
HomeCore 0.1.3 (07b5544)
Bare-metal personal computer firmware for Cortex-M
|
Console operations a serial driver provides. More...
#include <homecore/drivers/console.h>
Data Fields | |
| void(* | putc )(void *device, char c) |
| Write one byte, polling while the transmitter is busy. | |
| int(* | getc )(void *device) |
| Read one byte from the receive buffer, sleeping until one arrives; returns 0 to 255. | |
| int(* | has_data )(void *device) |
| Return nonzero if a received byte is buffered. | |
| void(* | flush )(void *device) |
| Wait until every written byte has left the transmitter. | |
| bool(* | ready )(void *device) |
| Return true once the device is initialized. | |
Console operations a serial driver provides.
| void(* console_ops_t::putc) (void *device, char c) |
Write one byte, polling while the transmitter is busy.
Usable with interrupts masked.
| int(* console_ops_t::getc) (void *device) |
Read one byte from the receive buffer, sleeping until one arrives; returns 0 to 255.
Needs interrupts enabled, because the receive interrupt fills the buffer.