Skip to content

Commit fc737be

Browse files
committed
revert 6630fe7 availableForWrite() return int
1 parent 32e5394 commit fc737be

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

cores/arduino/Print.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Print
5858

5959
// default to zero, meaning "a single write may block"
6060
// should be overriden by subclasses with buffering
61-
virtual size_t availableForWrite() { return 0; }
61+
virtual int availableForWrite() { return 0; }
6262

6363
size_t print(const __FlashStringHelper *);
6464
size_t print(const String &);

cores/arduino/USB/CDC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ int Serial_::available(void)
160160
return usb.available(CDC_ENDPOINT_OUT);
161161
}
162162

163-
size_t Serial_::availableForWrite(void)
163+
int Serial_::availableForWrite(void)
164164
{
165165
// return the number of bytes left in the current bank,
166166
// always EP size - 1, because bank is flushed on every write

cores/arduino/USB/USBAPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class Serial_ : public Stream
129129
void end(void);
130130

131131
virtual int available(void);
132-
virtual size_t availableForWrite(void);
132+
virtual int availableForWrite(void);
133133
virtual int peek(void);
134134
virtual int read(void);
135135
virtual void flush(void);

cores/arduino/Uart.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ int Uart::available()
131131
return rxBuffer.available();
132132
}
133133

134-
size_t Uart::availableForWrite()
134+
int Uart::availableForWrite()
135135
{
136136
return txBuffer.availableForStore();
137137
}

cores/arduino/Uart.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Uart : public HardwareSerial
3333
void begin(unsigned long baudrate, uint16_t config);
3434
void end();
3535
int available();
36-
size_t availableForWrite();
36+
int availableForWrite();
3737
int peek();
3838
int read();
3939
void flush();

0 commit comments

Comments
 (0)