1#if (defined ESP_PLATFORM || defined ROO_TESTING)
5#include "driver/uart.h"
9size_t Esp32UartInputStream::tryRead(roo::byte*
buf,
size_t count) {
10 if (!isOpen() ||
count == 0)
return 0;
12 return read > 0 ? read : 0;
15size_t Esp32UartInputStream::read(roo::byte*
buf,
size_t count) {
16 if (!isOpen() ||
count == 0)
return 0;
19 if (read > 0)
return read;
23 if (
count >
static_cast<size_t>(read)) {
26 count -
static_cast<size_t>(read), 0);
39size_t Esp32UartInputStream::readFully(roo::byte*
buf,
size_t count) {
40 if (!isOpen() ||
count == 0)
return 0;
48 total +=
static_cast<size_t>(read);
50 count -=
static_cast<size_t>(read);
roo::basic_string_view< CharT, Traits > basic_string_view