Support Isochronous transfer additionally
Dependents: USBHostC270_example_GR-PEACH USBHostDac_example USBHostDac_Audio_in_out
Fork of USBHost_custom by
Diff: USBHostSerial/USBHostSerial.h
- Revision:
- 38:dd168a3e4194
- Parent:
- 36:f8c0979c2814
--- a/USBHostSerial/USBHostSerial.h Tue Feb 28 02:51:39 2017 +0000 +++ b/USBHostSerial/USBHostSerial.h Tue Mar 14 05:38:25 2017 +0000 @@ -23,7 +23,7 @@ #include "USBHost.h" #include "Stream.h" -#include "MtxCircBuffer.h" +#include "CircBufferHostSerial.h" /** * A class to communicate a USB virtual serial port @@ -35,6 +35,11 @@ */ USBHostSerialPort(); + /** + * Destructor + */ + virtual ~USBHostSerialPort(); + enum IrqType { RxIrq, TxIrq @@ -58,11 +63,7 @@ * * @returns the number of bytes available */ -#if(1) uint32_t available(); -#else - uint8_t available(); -#endif /** * Attach a member function to call when a packet is received. @@ -128,8 +129,7 @@ void init(); -// MtxCircBuffer<uint8_t, 128> circ_buf; - MtxCircBuffer<uint8_t, (1024 * 32)> circ_buf; + CircBufferHostSerial<uint8_t, (1024 * 32)> * p_circ_buf; uint8_t buf[64];