![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
USBSerial Hello World
Fork of USBSerial_HelloWorld by
main.cpp@4:95c491d36524, 2011-11-17 (annotated)
- Committer:
- samux
- Date:
- Thu Nov 17 12:01:22 2011 +0000
- Revision:
- 4:95c491d36524
- Parent:
- 0:a3e641b0dfc2
- Child:
- 5:ee94acbf45df
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
samux | 0:a3e641b0dfc2 | 1 | #include "mbed.h" |
samux | 0:a3e641b0dfc2 | 2 | #include "USBSerial.h" |
samux | 0:a3e641b0dfc2 | 3 | |
samux | 0:a3e641b0dfc2 | 4 | //Virtual serial port over USB |
samux | 0:a3e641b0dfc2 | 5 | USBSerial serial; |
samux | 0:a3e641b0dfc2 | 6 | |
samux | 4:95c491d36524 | 7 | Serial pc(USBTX, USBRX); |
samux | 4:95c491d36524 | 8 | |
samux | 0:a3e641b0dfc2 | 9 | int main(void) { |
samux | 0:a3e641b0dfc2 | 10 | |
samux | 0:a3e641b0dfc2 | 11 | while(1) |
samux | 0:a3e641b0dfc2 | 12 | { |
samux | 4:95c491d36524 | 13 | serial.print("I am a virtual serial port!\r\n"); |
samux | 0:a3e641b0dfc2 | 14 | wait(1); |
samux | 0:a3e641b0dfc2 | 15 | } |
samux | 0:a3e641b0dfc2 | 16 | } |