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.
Dependents: ton_demo ton_template
Diff: USBTon.cpp
- Revision:
- 2:3a73d77c2cef
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/USBTon.cpp Thu Jun 29 20:11:00 2017 +0000
@@ -0,0 +1,17 @@
+#include "stdint.h"
+#include "USBTon.h"
+
+int USBTon::_putc(int c) {
+ VCP_write((uint8_t *)&c, 1);
+ return 1;
+}
+
+int USBTon::_getc() {
+ uint8_t c = 0;
+ VCP_read((uint8_t *)&c, 1);
+ return c;
+}
+
+uint8_t USBTon::available() {
+ return 1;
+}