Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main_serial.cpp@0:3395699bd0df, 2015-06-12 (annotated)
- Committer:
- va009039
- Date:
- Fri Jun 12 09:30:07 2015 +0000
- Revision:
- 0:3395699bd0df
- Child:
- 1:eea17a20509b
first commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| va009039 | 0:3395699bd0df | 1 | #if 0 |
| va009039 | 0:3395699bd0df | 2 | // https://developer.mbed.org/handbook/USBSerial |
| va009039 | 0:3395699bd0df | 3 | #include "mbed.h" |
| va009039 | 0:3395699bd0df | 4 | #include "USBSerial.h" |
| va009039 | 0:3395699bd0df | 5 | |
| va009039 | 0:3395699bd0df | 6 | extern void L152RE_USBclock_setup(); |
| va009039 | 0:3395699bd0df | 7 | |
| va009039 | 0:3395699bd0df | 8 | int main() { |
| va009039 | 0:3395699bd0df | 9 | L152RE_USBclock_setup(); |
| va009039 | 0:3395699bd0df | 10 | |
| va009039 | 0:3395699bd0df | 11 | USBSerial serial; |
| va009039 | 0:3395699bd0df | 12 | |
| va009039 | 0:3395699bd0df | 13 | while(1) { |
| va009039 | 0:3395699bd0df | 14 | serial.printf("I am a virtual serial port\r\n"); |
| va009039 | 0:3395699bd0df | 15 | wait_ms(1000); |
| va009039 | 0:3395699bd0df | 16 | } |
| va009039 | 0:3395699bd0df | 17 | } |
| va009039 | 0:3395699bd0df | 18 | #endif |