35 #ifndef ROS_ARDUINO_HARDWARE_H_ 36 #define ROS_ARDUINO_HARDWARE_H_ 44 #if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__MKL26Z64__) 45 #if defined(USE_TEENSY_HW_SERIAL) 46 #define SERIAL_CLASS HardwareSerial // Teensy HW Serial 48 #include <usb_serial.h> 49 #define SERIAL_CLASS usb_serial_class 51 #elif defined(_SAM3XA_) 52 #include <UARTClass.h> 53 #define SERIAL_CLASS UARTClass 54 #elif defined(USE_USBCON) 56 #define SERIAL_CLASS Serial_ 57 #elif (defined(__STM32F1__) and !(defined(USE_STM32_HW_SERIAL))) or defined(SPARK) 59 #define SERIAL_CLASS USBSerial 61 #include <HardwareSerial.h> 62 #define SERIAL_CLASS HardwareSerial 73 #if defined(_SAMD21_) and defined(USE_USBCON) 75 #elif defined(USBCON) and !(defined(USE_USBCON)) 78 #elif defined(USE_TEENSY_HW_SERIAL) or defined(USE_STM32_HW_SERIAL) 101 #if defined(USE_USBCON) 109 void write(uint8_t* data,
int length){
113 unsigned long time(){
return millis();}
void setPort(SERIAL_CLASS *io)
ArduinoHardware(ArduinoHardware &h)
void write(uint8_t *data, int length)
ArduinoHardware(SERIAL_CLASS *io, long baud=57600)