NuMaker RS485 lib
Dependents: NuMaker-mbed-modbus-sample
Diff: nvt_rs485.cpp
- Revision:
- 4:3bdf456890b6
- Parent:
- 3:4c9d65e9275c
- Child:
- 5:3725fa015f1d
--- a/nvt_rs485.cpp Fri Oct 06 02:23:24 2017 +0000 +++ b/nvt_rs485.cpp Thu Feb 25 15:26:25 2021 +0800 @@ -1,8 +1,12 @@ #include "nvt_rs485.h" #include "PeripheralPins.h" - +#if MBED_MAJOR_VERSION >= 6 +NvtRS485::NvtRS485(PinName tx, PinName rx, PinName dir) + : MyUnbufferedSerial(tx, rx) +#else NvtRS485::NvtRS485(PinName tx, PinName rx, PinName dir) : Serial(tx, rx) +#endif { this->set_rs485_mode(dir); }