aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/USBAPI.h
diff options
context:
space:
mode:
authorPeter Van Hoyweghen <N.A>2015-07-04 08:28:52 +0200
committerMatthijs Kooijman <matthijs@stdin.nl>2015-07-31 14:06:20 +0200
commit3baff3b4114f28cd6ae0bfbb25d4efeb6f03278b (patch)
tree391c8bd961cfa269566e33422df15cce616d7259 /cores/arduino/USBAPI.h
parent303ebdb0ccbc13dec765f1ce7ca681d73a7e9b90 (diff)
Add Serial_::availableForWrite().
This makes the CDC "Serial" object on the Leonardo and similar boards support this recently introduced method as well. The CDC code in the sam core is not changed.
Diffstat (limited to 'cores/arduino/USBAPI.h')
-rw-r--r--cores/arduino/USBAPI.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h
index 3d355d2..5f4947e 100644
--- a/cores/arduino/USBAPI.h
+++ b/cores/arduino/USBAPI.h
@@ -92,6 +92,7 @@ public:
virtual int available(void);
virtual int peek(void);
virtual int read(void);
+ int availableForWrite(void);
virtual void flush(void);
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t*, size_t);
@@ -188,6 +189,7 @@ int USB_SendControl(uint8_t flags, const void* d, int len);
int USB_RecvControl(void* d, int len);
uint8_t USB_Available(uint8_t ep);
+uint8_t USB_SendSpace(uint8_t ep);
int USB_Send(uint8_t ep, const void* data, int len); // blocking
int USB_Recv(uint8_t ep, void* data, int len); // non-blocking
int USB_Recv(uint8_t ep); // non-blocking