https://groups.google.com/a/arduino.cc/d/msg/developers/ls3hkviFYM4/XWT2LbfzNcgJmain
@@ -100,7 +100,7 @@ void serial_set_transmit_pin(uint8_t pin); | |||
void serial_putchar(uint32_t c); | |||
void serial_write(const void *buf, unsigned int count); | |||
void serial_flush(void); | |||
int serial_room(void); | |||
int serial_write_buffer_free(void); | |||
int serial_available(void); | |||
int serial_getchar(void); | |||
int serial_peek(void); | |||
@@ -116,7 +116,7 @@ void serial2_end(void); | |||
void serial2_putchar(uint32_t c); | |||
void serial2_write(const void *buf, unsigned int count); | |||
void serial2_flush(void); | |||
int serial2_room(void); | |||
int serial2_write_buffer_free(void); | |||
int serial2_available(void); | |||
int serial2_getchar(void); | |||
int serial2_peek(void); | |||
@@ -128,7 +128,7 @@ void serial3_end(void); | |||
void serial3_putchar(uint32_t c); | |||
void serial3_write(const void *buf, unsigned int count); | |||
void serial3_flush(void); | |||
int serial3_room(void); | |||
int serial3_write_buffer_free(void); | |||
int serial3_available(void); | |||
int serial3_getchar(void); | |||
int serial3_peek(void); | |||
@@ -157,7 +157,7 @@ public: | |||
virtual int read(void) { return serial_getchar(); } | |||
virtual void flush(void) { serial_flush(); } | |||
virtual void clear(void) { serial_clear(); } | |||
virtual int room(void) { return serial_room(); } | |||
virtual int writeBufferFree(void) { return serial_write_buffer_free(); } | |||
virtual size_t write(uint8_t c) { serial_putchar(c); return 1; } | |||
virtual size_t write(unsigned long n) { return write((uint8_t)n); } | |||
virtual size_t write(long n) { return write((uint8_t)n); } | |||
@@ -186,7 +186,7 @@ public: | |||
virtual int read(void) { return serial2_getchar(); } | |||
virtual void flush(void) { serial2_flush(); } | |||
virtual void clear(void) { serial2_clear(); } | |||
virtual int room(void) { return serial2_room(); } | |||
virtual int writeBufferFree(void) { return serial2_write_buffer_free(); } | |||
virtual size_t write(uint8_t c) { serial2_putchar(c); return 1; } | |||
virtual size_t write(unsigned long n) { return write((uint8_t)n); } | |||
virtual size_t write(long n) { return write((uint8_t)n); } | |||
@@ -215,7 +215,7 @@ public: | |||
virtual int read(void) { return serial3_getchar(); } | |||
virtual void flush(void) { serial3_flush(); } | |||
virtual void clear(void) { serial3_clear(); } | |||
virtual int room(void) { return serial3_room(); } | |||
virtual int writeBufferFree(void) { return serial3_write_buffer_free(); } | |||
virtual size_t write(uint8_t c) { serial3_putchar(c); return 1; } | |||
virtual size_t write(unsigned long n) { return write((uint8_t)n); } | |||
virtual size_t write(long n) { return write((uint8_t)n); } |
@@ -216,7 +216,7 @@ void serial_flush(void) | |||
while (transmitting) yield(); // wait | |||
} | |||
int serial_room(void) | |||
int serial_write_buffer_free(void) | |||
{ | |||
uint32_t head, tail; | |||
@@ -177,7 +177,7 @@ void serial2_flush(void) | |||
while (transmitting) yield(); // wait | |||
} | |||
int serial2_room(void) | |||
int serial2_write_buffer_free(void) | |||
{ | |||
uint32_t head, tail; | |||
@@ -171,7 +171,7 @@ void serial3_flush(void) | |||
while (transmitting) yield(); // wait | |||
} | |||
int serial3_room(void) | |||
int serial3_write_buffer_free(void) | |||
{ | |||
uint32_t head, tail; | |||
@@ -223,7 +223,7 @@ int usb_seremu_write(const void *buffer, uint32_t size) | |||
#endif | |||
} | |||
int usb_seremu_room(void) | |||
int usb_seremu_write_buffer_free(void) | |||
{ | |||
uint32_t len; | |||
@@ -47,7 +47,7 @@ int usb_seremu_available(void); | |||
void usb_seremu_flush_input(void); | |||
int usb_seremu_putchar(uint8_t c); | |||
int usb_seremu_write(const void *buffer, uint32_t size); | |||
int usb_seremu_room(void); | |||
int usb_seremu_write_buffer_free(void); | |||
void usb_seremu_flush_output(void); | |||
void usb_seremu_flush_callback(void); | |||
extern volatile uint8_t usb_seremu_transmit_flush_timer; | |||
@@ -74,7 +74,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 room() { return usb_seremu_room(); } | |||
int writeBufferFree() { return usb_seremu_write_buffer_free(); } | |||
using Print::write; | |||
void send_now(void) { usb_seremu_flush_output(); }; | |||
uint32_t baud(void) { return 9600; } | |||
@@ -111,7 +111,7 @@ public: | |||
size_t write(long n) { return 1; } | |||
size_t write(unsigned int n) { return 1; } | |||
size_t write(int n) { return 1; } | |||
int room() { return 0; } | |||
int writeBufferFree() { return 0; } | |||
using Print::write; | |||
void send_now(void) { } | |||
uint32_t baud(void) { return 0; } |
@@ -224,7 +224,7 @@ int usb_serial_write(const void *buffer, uint32_t size) | |||
return 0; | |||
} | |||
int usb_serial_room(void) | |||
int usb_serial_write_buffer_free(void) | |||
{ | |||
uint32_t len; | |||
@@ -48,7 +48,7 @@ int usb_serial_read(void *buffer, uint32_t size); | |||
void usb_serial_flush_input(void); | |||
int usb_serial_putchar(uint8_t c); | |||
int usb_serial_write(const void *buffer, uint32_t size); | |||
int usb_serial_room(void); | |||
int usb_serial_write_buffer_free(void); | |||
void usb_serial_flush_output(void); | |||
extern uint32_t usb_cdc_line_coding[2]; | |||
extern volatile uint8_t usb_cdc_line_rtsdtr; | |||
@@ -79,7 +79,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 room() { return usb_serial_room(); } | |||
int writeBufferFree() { 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]; } | |||
@@ -126,7 +126,7 @@ public: | |||
size_t write(long n) { return 1; } | |||
size_t write(unsigned int n) { return 1; } | |||
size_t write(int n) { return 1; } | |||
int room() { return 0; } | |||
int writeBufferFree() { return 0; } | |||
using Print::write; | |||
void send_now(void) { } | |||
uint32_t baud(void) { return 0; } |