IOTON boards API using mbed SDK - http://ioton.cc/plataforma-ton
Dependents: ton-bot_teste ton-bot_seguidor_linha ton-bot_seguidor_parede
Fork of IOTON-API by
USBTon.cpp@1:3a73d77c2cef, 2017-06-29 (annotated)
- Committer:
- krebyy
- Date:
- Thu Jun 29 20:11:00 2017 +0000
- Revision:
- 1:3a73d77c2cef
Update to TON Board V1.2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
krebyy | 1:3a73d77c2cef | 1 | #include "stdint.h" |
krebyy | 1:3a73d77c2cef | 2 | #include "USBTon.h" |
krebyy | 1:3a73d77c2cef | 3 | |
krebyy | 1:3a73d77c2cef | 4 | int USBTon::_putc(int c) { |
krebyy | 1:3a73d77c2cef | 5 | VCP_write((uint8_t *)&c, 1); |
krebyy | 1:3a73d77c2cef | 6 | return 1; |
krebyy | 1:3a73d77c2cef | 7 | } |
krebyy | 1:3a73d77c2cef | 8 | |
krebyy | 1:3a73d77c2cef | 9 | int USBTon::_getc() { |
krebyy | 1:3a73d77c2cef | 10 | uint8_t c = 0; |
krebyy | 1:3a73d77c2cef | 11 | VCP_read((uint8_t *)&c, 1); |
krebyy | 1:3a73d77c2cef | 12 | return c; |
krebyy | 1:3a73d77c2cef | 13 | } |
krebyy | 1:3a73d77c2cef | 14 | |
krebyy | 1:3a73d77c2cef | 15 | uint8_t USBTon::available() { |
krebyy | 1:3a73d77c2cef | 16 | return 1; |
krebyy | 1:3a73d77c2cef | 17 | } |