Skip to content

Commit eada505

Browse files
authored
Merge pull request #1747 from shauew/patch-1
Update portserial_m.c
2 parents 361a1b2 + eea0b9e commit eada505

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/net/freemodbus/port/portserial_m.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ BOOL xMBMasterPortSerialInit(UCHAR ucPORT, ULONG ulBaudRate, UCHAR ucDataBits,
5757
* set 485 mode receive and transmit control IO
5858
* @note MODBUS_MASTER_RT_CONTROL_PIN_INDEX need be defined by user
5959
*/
60+
#if defined(RT_MODBUS_MASTER_USE_CONTROL_PIN)
6061
rt_pin_mode(MODBUS_MASTER_RT_CONTROL_PIN_INDEX, PIN_MODE_OUTPUT);
62+
#endif
6163

6264
/* set serial name */
6365
if (ucPORT == 1) {

0 commit comments

Comments
 (0)