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.
Dependencies: mbed AsyncSerialh USBDevice
main.cpp@14:7cddebaa6445, 2020-07-23 (annotated)
- Committer:
- kanope_benny
- Date:
- Thu Jul 23 09:19:26 2020 +0000
- Revision:
- 14:7cddebaa6445
- Parent:
- 13:cfc2671df9ac
test_172
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 | 7:5e693654d5b4 | 6 | |
| kanope_benny | 10:36d95e7da44b | 7 | Serial pc(USBTX, USBRX); |
| kanope_benny | 13:cfc2671df9ac | 8 | // tototot |
| kanope_benny | 10:36d95e7da44b | 9 | |
| samux | 7:5e693654d5b4 | 10 | int main(void) { |
| samux | 9:d88699a0905a | 11 | |
| kanope_benny | 14:7cddebaa6445 | 12 | |
| kanope_benny | 14:7cddebaa6445 | 13 | pc.baud(115200) ; |
| kanope_benny | 14:7cddebaa6445 | 14 | |
| kanope_benny | 14:7cddebaa6445 | 15 | pc.printf("\nOK"); |
| samux | 7:5e693654d5b4 | 16 | while(1) |
| samux | 7:5e693654d5b4 | 17 | { |
| samux | 9:d88699a0905a | 18 | serial.printf("I am a virtual serial port\r\n"); |
| samux | 9:d88699a0905a | 19 | wait(1); |
| samux | 7:5e693654d5b4 | 20 | } |
| samux | 7:5e693654d5b4 | 21 | } |