USB device stack
Fork of USBDevice by
Revision 60:b1e3889495d3, committed 2015-06-24
- Comitter:
- jpiat
- Date:
- Wed Jun 24 11:27:47 2015 +0000
- Parent:
- 59:dba1951546c3
- Commit message:
- Corrected an error on data type for available method on USBSerial
Changed in this revision
USBSerial/USBSerial.cpp | Show annotated file Show diff for this revision Revisions of this file |
USBSerial/USBSerial.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r dba1951546c3 -r b1e3889495d3 USBSerial/USBSerial.cpp --- a/USBSerial/USBSerial.cpp Thu Jun 11 18:42:39 2015 +0000 +++ b/USBSerial/USBSerial.cpp Wed Jun 24 11:27:47 2015 +0000 @@ -62,6 +62,6 @@ return true; } -uint8_t USBSerial::available() { +uint16_t USBSerial::available() { return buf.available(); }
diff -r dba1951546c3 -r b1e3889495d3 USBSerial/USBSerial.h --- a/USBSerial/USBSerial.h Thu Jun 11 18:42:39 2015 +0000 +++ b/USBSerial/USBSerial.h Wed Jun 24 11:27:47 2015 +0000 @@ -45,6 +45,7 @@ * @endcode */ class USBSerial: public USBCDC, public Stream { + public: /** @@ -56,7 +57,7 @@ * @param connect_blocking define if the connection must be blocked if USB not plugged in * */ - USBSerial(uint16_t vendor_id = 0x1f00, uint16_t product_id = 0x2012, uint16_t product_release = 0x0001, bool connect_blocking = true): USBCDC(vendor_id, product_id, product_release, connect_blocking), buf(8192*2){ + USBSerial(uint16_t vendor_id = 0x1f00, uint16_t product_id = 0x2012, uint16_t product_release = 0x0001, int buf_size = 8192, bool connect_blocking = true): USBCDC(vendor_id, product_id, product_release, connect_blocking), buf(buf_size){ settingsChangedCallback = 0; }; @@ -81,7 +82,7 @@ * * @returns the number of bytes available */ - uint8_t available(); + uint16_t available(); /** Determine if there is a character available to read *