Mbed USBSerial "Hello world" example. Just Open a terminal window and see the result. Note that no baudrate setting is necessary.
Revision 0:7d5e1b4145a3, committed 2022-06-16
- Comitter:
- cspista
- Date:
- Thu Jun 16 12:17:17 2022 +0000
- Commit message:
- Final version
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/USBDevice.lib Thu Jun 16 12:17:17 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/USBDevice/#53949e6131f6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Jun 16 12:17:17 2022 +0000
@@ -0,0 +1,18 @@
+
+/* Lab10_USBserail
+ *
+ * Mbed USBSerial Hello world" example
+ * Just Open a terminal window and see the result.
+ * Note that no baudrate setting is necessary.
+ */
+
+#include "mbed.h"
+#include "USBSerial.h"
+
+USBSerial serial; //Virtual serial port over USB
+int main(void) {
+ while(1) {
+ serial.printf("I am a virtual serial port\r\n");
+ wait(1);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Jun 16 12:17:17 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file