NuMaker RS485 lib

Dependents:   NuMaker-mbed-modbus-sample

nvt_rs485.h

Committer:
cyliang
Date:
14 months ago
Revision:
5:3725fa015f1d
Parent:
4:3bdf456890b6

File content as of revision 5:3725fa015f1d:

#ifndef NVTRS485_H
#define NVTRS485_H
 
#include "mbed.h"
#if MBED_MAJOR_VERSION >= 6
#include "MyUnbufferedSerial.h"
class NvtRS485 : public MyUnbufferedSerial {
#else
class NvtRS485 : public Serial {
#endif
public:
    NvtRS485(PinName tx, PinName rx, PinName dir);
    virtual ~NvtRS485(void);
    int set_rs485_mode(PinName dir);
};

#endif //NVTRS485_H