test

Dependencies:   mbed Watchdog

Dependents:   STM32-MC_node

RS485Hardware.h

Committer:
ruslanbredun
Date:
2020-12-14
Revision:
16:82251ada9b04
Parent:
0:d383e2dee0f7

File content as of revision 16:82251ada9b04:

/*
 * RS485Hardware
 *
 *  Created on: june 7, 2020
 *      Author: opp
 */

#ifndef ROS_RS485_HARDWARE_H_
#define ROS_RS485_HARDWARE_H_

//#include <ros.h>
//
//class RS485Hardware : public MbedHardware
//{
//    public:
//      RS485Hardware():MbedHardware(PinName tx, PinName rx, 57600){};
//
//      void init(){
//        pinMode(RTS, OUTPUT);
//        digitalWrite(RTS, LOW);
//        iostream->baud(baud_);
//      }
//
//      int read(){
//        return iostream->read();
//      };
//
//      void write(uint8_t* data, int length){
//          digitalWrite(RTS, HIGH);
//          for(int i=0; i<length; i++){
//            iostream->write(data[i]);
//          }
//          while(!(UCSR1A & (1<<TXC1)));
//        digitalWrite(RTS, LOW);
//    }
//
//    unsigned long time(){return t.read_ms();}
//};
//
//ros::NodeHandle_<RS485Hardware> nh;


#endif /* ROS_RS485_HARDWARE_H_ */