Quellcode durchsuchen

rename writeBufferFree() to availableForWrite()

teensy4-core
PaulStoffregen vor 10 Jahren
Ursprung
Commit
3b9ae1513b
3 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen
  1. +3
    -3
      teensy3/HardwareSerial.h
  2. +2
    -2
      teensy3/usb_seremu.h
  3. +2
    -2
      teensy3/usb_serial.h

+ 3
- 3
teensy3/HardwareSerial.h Datei anzeigen

@@ -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 writeBufferFree(void) { return serial_write_buffer_free(); }
virtual int availableForWrite(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 writeBufferFree(void) { return serial2_write_buffer_free(); }
virtual int availableForWrite(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 writeBufferFree(void) { return serial3_write_buffer_free(); }
virtual int availableForWrite(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); }

+ 2
- 2
teensy3/usb_seremu.h Datei anzeigen

@@ -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 writeBufferFree() { return usb_seremu_write_buffer_free(); }
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; }
@@ -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 writeBufferFree() { return 0; }
int availableForWrite() { return 0; }
using Print::write;
void send_now(void) { }
uint32_t baud(void) { return 0; }

+ 2
- 2
teensy3/usb_serial.h Datei anzeigen

@@ -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 writeBufferFree() { return usb_serial_write_buffer_free(); }
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]; }
@@ -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 writeBufferFree() { return 0; }
int availableForWrite() { return 0; }
using Print::write;
void send_now(void) { }
uint32_t baud(void) { return 0; }

Laden…
Abbrechen
Speichern