USB device stack; Added getter method for terminal_connected;
Fork of USBDevice by
Example of use:
#include "mbed.h" #include "USBSerial.h" USBSerial pc; DigitalOut blue_led(P0_20); int main() { blue_led = 1; while(!pc.getTerminal_connected()); //Wait for serial terminal to connect... while(1) { blue_led = 0; wait(0.2); blue_led = 1; wait(0.2); } }
Diff: USBSerial/USBSerial.cpp
- Revision:
- 32:37f14e05bfd7
- Parent:
- 11:eeb3cbbaa996
- Child:
- 47:a0cd9646ecd1
--- a/USBSerial/USBSerial.cpp Thu Aug 21 15:00:37 2014 +0100 +++ b/USBSerial/USBSerial.cpp Mon Oct 06 11:00:28 2014 +0100 @@ -59,8 +59,6 @@ //call a potential handler rx.call(); - // We reactivate the endpoint to receive next characters - readStart(EPBULK_OUT, MAX_PACKET_SIZE_EPBULK); return true; }