![]() |
Max OS 0.3
|
A driver for the serial output. More...
#include <serial.h>
Public Member Functions | |
| SerialConsole () | |
| Constructs a new Serial Console object and initialises the serial port. | |
| SerialConsole (Logger *logger) | |
| Constructs a new Serial Console object and initialises the serial port. | |
| void | put_character (char c) |
| Waits for the serial port to be ready, then writes a character to it. | |
| void | write_char (char c) final |
| Waits for the serial port to be ready, then writes a character to it. | |
| bool | can_read () |
| Checks if data can be read from the serial port. | |
| char | read_char () |
| Read data from the serial port. | |
|
explicit |
Constructs a new Serial Console object and initialises the serial port.
Definition at line 19 of file serial.cpp.
References can_read(), and read_char().
|
explicit |
Constructs a new Serial Console object and initialises the serial port.
| logger | The logger which will use this serial console as a log writer |
Definition at line 69 of file serial.cpp.
References MaxOS::Logger::add_log_writer(), and MaxOS::runtime::DO_DEBUGGING.
| bool SerialConsole::can_read | ( | ) |
Checks if data can be read from the serial port.
Definition at line 108 of file serial.cpp.
Referenced by SerialConsole().
| void SerialConsole::put_character | ( | char | c | ) |
Waits for the serial port to be ready, then writes a character to it.
| c | The character to write |
Definition at line 84 of file serial.cpp.
Referenced by write_char().
| char SerialConsole::read_char | ( | ) |
Read data from the serial port.
Definition at line 117 of file serial.cpp.
Referenced by SerialConsole().
|
final |
Waits for the serial port to be ready, then writes a character to it.
| c | The character to write |
Definition at line 99 of file serial.cpp.
References put_character().
Referenced by MaxOS::runtime::GDBServer::handle_continue(), and MaxOS::runtime::GDBServer::handle_step_instruction().