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.
telemetry-arduino-hal.cpp
00001 /* 00002 * telemetry-arduino-hal.cpp 00003 * 00004 * Created on: Mar 2, 2015 00005 * Author: Ducky 00006 * 00007 * Telemetry HAL for Serial on Arduino. 00008 */ 00009 00010 #ifdef ARDUINO 00011 00012 #include "telemetry-arduino.h" 00013 00014 namespace telemetry { 00015 00016 void ArduinoHalInterface::transmit_byte(uint8_t data) { 00017 serial.write(data); 00018 } 00019 00020 size_t ArduinoHalInterface::rx_available() { 00021 return serial.available(); 00022 } 00023 00024 uint8_t ArduinoHalInterface::receive_byte() { 00025 // TODO: handle -1 case 00026 return serial.read(); 00027 } 00028 00029 void ArduinoHalInterface::do_error(const char* msg) { 00030 // TODO: use side channel? 00031 serial.println(msg); 00032 } 00033 00034 } 00035 00036 #endif // ifdef ARDUINO
Generated on Wed Jul 20 2022 05:38:47 by
1.7.2