modified for NuMaker_PFM series
Dependents: NuMaker-mbed-modbus-sample NuMaker_NuWicam_Lite NuMaker-mbed-modbus-sample
Fork of Modbus by
Diff: portserial.cpp
- Revision:
- 7:abafdf714896
- Parent:
- 6:08849dd9654d
- Child:
- 8:456375d72644
--- a/portserial.cpp Wed Jan 04 08:31:29 2017 +0000 +++ b/portserial.cpp Wed Feb 08 12:05:49 2017 +0000 @@ -38,7 +38,7 @@ //#define DEF_RS485_PORT 1 /* ----------------------- System Variables ---------------------------------*/ -#if defined(DEF_RS485_PORT) // mbed serial port +#if defined(MBED_CONF_APP_DEF_RS485_PORT) && (MBED_CONF_APP_DEF_RS485_PORT)// mbed serial port #include "nvt_rs485.h" // RS485 TX, RX, RTS pins #if defined(TARGET_NUMAKER_PFM_NUC472) // for NUC472 board @@ -91,7 +91,7 @@ xMBPortSerialInit( UCHAR ucPORT, ULONG ulBaudRate, UCHAR ucDataBits, eMBParity eParity ) { pc.baud(ulBaudRate); -#if defined(DEF_RS485_PORT) // mbed serial port +#if defined(MBED_CONF_APP_DEF_RS485_PORT) && (MBED_CONF_APP_DEF_RS485_PORT) // mbed serial port #if defined(TARGET_NUMAKER_PFM_NUC472) // for NUC472 board pc.set_rs485_mode(PF_11); #elif defined(TARGET_NUMAKER_PFM_M453) // for M453 board