,,
Fork of Application by
main.cpp@8:90f8322a65f8, 2012-12-20 (annotated)
- Committer:
- samux
- Date:
- Thu Dec 20 17:09:19 2012 +0000
- Revision:
- 8:90f8322a65f8
- Parent:
- 7:5e693654d5b4
- Child:
- 9:d88699a0905a
use latest USBDevice library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
samux | 7:5e693654d5b4 | 1 | #include "mbed.h" |
samux | 7:5e693654d5b4 | 2 | #include "USBSerial.h" |
samux | 7:5e693654d5b4 | 3 | |
samux | 7:5e693654d5b4 | 4 | //Virtual serial port over USB |
samux | 7:5e693654d5b4 | 5 | USBSerial serial; |
samux | 8:90f8322a65f8 | 6 | DigitalOut l1(LED1); |
samux | 7:5e693654d5b4 | 7 | |
samux | 7:5e693654d5b4 | 8 | int main(void) { |
samux | 8:90f8322a65f8 | 9 | int i = 0; |
samux | 8:90f8322a65f8 | 10 | |
samux | 7:5e693654d5b4 | 11 | while(1) |
samux | 7:5e693654d5b4 | 12 | { |
samux | 8:90f8322a65f8 | 13 | serial.printf("I am a virtual serial port: %d\r\n", i++); |
samux | 8:90f8322a65f8 | 14 | wait(0.1); |
samux | 8:90f8322a65f8 | 15 | l1 = !l1; |
samux | 7:5e693654d5b4 | 16 | } |
samux | 7:5e693654d5b4 | 17 | } |