Vodafone K3770/K3772-Z modems driver & networking library
Dependencies: Socket USBHostWANDongle lwip-sys lwip
Dependents: VodafoneUSBModemHTTPClientTest VodafoneUSBModemNTPClientTest VodafoneUSBModemSMSTest VodafoneUSBModemUSSDTest ... more
Fork of VodafoneUSBModem_bleedingedge by
This is the driver for the Vodafone K3700 & K3772-Z Dongles:
More details and instructions can be found here.
Diff: serial/usb/USBSerialStream.cpp
- Revision:
- 95:84f01d280c9b
- Parent:
- 83:897a0de9d668
--- a/serial/usb/USBSerialStream.cpp Wed Mar 26 17:15:23 2014 +0000 +++ b/serial/usb/USBSerialStream.cpp Fri Apr 25 13:33:55 2014 +0000 @@ -30,30 +30,6 @@ #include "USBSerialStream.h" -// XXX ashley's debug -void printBuffer(uint8_t* buf, int len, bool readIn) { - - if(len<0) { - return; - } - - if(readIn) { - printf("Read(%d): '",len); - } else { - printf("Writing(%d): '",len); - } - for(int i=0; i<len; i++) { - if(buf[i]==0x0a) { - putchar('N'); - } else if(buf[i]==0x0d) { - putchar('R'); - } else { - putchar(buf[i]); - } - } - printf("'\r\n"); -} - USBSerialStream::USBSerialStream(IUSBHostSerial& serial) : m_serial(serial), m_serialTxFifoEmpty(true), m_availableSphre(1), m_spaceSphre(1), m_inBuf() { @@ -71,7 +47,6 @@ //0 for non-blocking (returns immediately), -1 for infinite blocking /*virtual*/ int USBSerialStream::read(uint8_t* buf, size_t* pLength, size_t maxLength, uint32_t timeout/*=osWaitForever*/) { - uint8_t *bufPointerCopy = buf; DBG("Trying to read at most %d chars", maxLength); int ret = waitAvailable(timeout); if(ret) @@ -91,7 +66,6 @@ buf++; } setupReadableISR(true); - //printBuffer(bufPointerCopy,*pLength,true); // XXX return OK; } @@ -163,7 +137,6 @@ //0 for non-blocking (returns immediately), -1 for infinite blocking /*virtual*/ int USBSerialStream::write(uint8_t* buf, size_t length, uint32_t timeout/*=-1*/) { - //printBuffer(buf,length,false); // XXX DBG("Trying to write %d chars", length); do {