@@ -53,6 +53,7 @@ class Print | |||
virtual size_t write(uint8_t b) = 0; | |||
size_t write(const char *str) { return write((const uint8_t *)str, strlen(str)); } | |||
virtual size_t write(const uint8_t *buffer, size_t size); | |||
virtual int availableForWrite(void) { return 0; } | |||
virtual void flush() { } | |||
size_t write(const char *buffer, size_t size) { return write((const uint8_t *)buffer, size); } | |||
size_t print(const String &s); |
@@ -76,7 +76,7 @@ public: | |||
size_t write(long n) { return write((uint8_t)n); } | |||
size_t write(unsigned int n) { return write((uint8_t)n); } | |||
size_t write(int n) { return write((uint8_t)n); } | |||
int availableForWrite() { return usb_seremu_write_buffer_free(); } | |||
virtual int availableForWrite() { return usb_seremu_write_buffer_free(); } | |||
using Print::write; | |||
void send_now(void) { usb_seremu_flush_output(); }; | |||
uint32_t baud(void) { return 9600; } |
@@ -90,7 +90,7 @@ public: | |||
size_t write(long n) { return write((uint8_t)n); } | |||
size_t write(unsigned int n) { return write((uint8_t)n); } | |||
size_t write(int n) { return write((uint8_t)n); } | |||
int availableForWrite() { return usb_serial_write_buffer_free(); } | |||
virtual int availableForWrite() { return usb_serial_write_buffer_free(); } | |||
using Print::write; | |||
void send_now(void) { usb_serial_flush_output(); } | |||
uint32_t baud(void) { return usb_cdc_line_coding[0]; } |