diff options
Diffstat (limited to 'tmk_core/tool/mbed/mbed-sdk/libraries/tests/usb/device/serial')
-rw-r--r-- | tmk_core/tool/mbed/mbed-sdk/libraries/tests/usb/device/serial/main.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tmk_core/tool/mbed/mbed-sdk/libraries/tests/usb/device/serial/main.cpp b/tmk_core/tool/mbed/mbed-sdk/libraries/tests/usb/device/serial/main.cpp new file mode 100644 index 0000000000..73e52bbfae --- /dev/null +++ b/tmk_core/tool/mbed/mbed-sdk/libraries/tests/usb/device/serial/main.cpp @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "USBSerial.h" + +//Virtual serial port over USB +USBSerial serial; +DigitalOut l1(LED1); + +int main(void) { + int i = 0; + + while(1) + { + l1 = !l1; + printf("Hello\r\n"); + serial.printf("I am a virtual serial port: %d\r\n", i++); + wait(0.1); + } +} |