Uart debugging support (#2478)

Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
Co-authored-by: Maurice Makaay <account-github@makaay.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Maurice Makaay
2021-11-10 23:34:17 +01:00
committed by GitHub
parent abf3708cc2
commit e99af991ec
11 changed files with 430 additions and 13 deletions
+3 -3
View File
@@ -45,17 +45,17 @@ class UARTDevice {
// Compat APIs
int read() {
uint8_t data;
if (!read_byte(&data))
if (!this->read_byte(&data))
return -1;
return data;
}
size_t write(uint8_t data) {
write_byte(data);
this->write_byte(data);
return 1;
}
int peek() {
uint8_t data;
if (!peek_byte(&data))
if (!this->peek_byte(&data))
return -1;
return data;
}