practice
Dependencies: max32625pico USBDevice
Revision 14:894c1c8a4355, committed 2020-01-23
- Comitter:
- mjoun
- Date:
- Thu Jan 23 23:44:25 2020 +0000
- Parent:
- 13:6c2d1cdcde12
- Commit message:
- Hello
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6c2d1cdcde12 -r 894c1c8a4355 main.cpp --- a/main.cpp Wed Aug 22 17:40:45 2018 +0000 +++ b/main.cpp Thu Jan 23 23:44:25 2020 +0000 @@ -5,6 +5,7 @@ // Hardware serial port over DAPLink Serial daplink(P2_1, P2_0); +Serial pc(USBTX, USBRX); DigitalOut rLED(LED1, LED_OFF); DigitalOut gLED(LED2, LED_OFF); @@ -38,6 +39,10 @@ // (note the calls to Thread::wait below for delays) int main() { +// device.baud(19200); +// while(true){ +// device.printf("Hello World\n"); +pc.baud(115200); float aIn; int ledCnt = 0; @@ -82,7 +87,7 @@ rLED = LED_ON; gLED = LED_ON; bLED = LED_ON; - + while (true) { if (!button) { keyboard.mediaControl(KEY_MUTE); @@ -91,9 +96,12 @@ bLED = ((ledCnt % 4) != 2); rLED = ((ledCnt % 4) != 3); Thread::wait(500); + pc.printf("Hello World"); } else { Thread::wait(50); } + + } }