Author Topic: conflicted define in modbus.c  (Read 1299 times)

Offline Kiger

  • Newbie
  • *
  • Posts: 5
    • View Profile
conflicted define in modbus.c
« on: June 01, 2017, 08:45:49 AM »
Dear Mark @mark,

The  AUTO_RS485_RTS_SUPPORT define   was conflicted.

in line 910#  of modbus.c

        #if !defined AUTO_RS485_RTS_SUPPORT && (!defined _LPC23XX && !defined _LPC17XX) // {V1.19}
        fnConfigRTS_delay(ucMODBUSport, &tInterfaceParameters);
        #endif

the function "fnConfigRTS_delay" was invoked when AUTO_RS485_RTS_SUPPORT undefined.

But in line 358#  1687# the function was declared and implemented when the "AUTO_RS485_RTS_SUPPORT " was defined.

line 358#
    #if defined MODBUS_RS485_RTS_SUPPORT
    static void fnConfigRTS_delay(unsigned char ucMODBUSport, TTYTABLE *InterfaceParameters);
    #endif




Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2955
    • View Profile
    • uTasker
Re: conflicted define in modbus.c
« Reply #1 on: June 01, 2017, 07:39:28 PM »
Hi

I think that you are using an older version of the Modbus package.
From V1.27 it has the following:

        #if !defined AUTO_RS485_RTS_SUPPORT && (!defined _LPC23XX && !defined _LPC17XX && !defined KINETIS_KE && !defined KINETIS_KL) // {V1.19} {V1.27}
        fnConfigRTS_delay(ucMODBUSport, &tInterfaceParameters);
        #endif


which excludes this option on KE and KL Kinetis parts that have no automatic RTS line control.

Regards

Mark


Offline Kiger

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: conflicted define in modbus.c
« Reply #2 on: June 01, 2017, 10:54:23 PM »
@mark,

Yes , I use the modbus package version 1.23 .
Where can I got the  newest version?

Best Regards,
Kiger

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2955
    • View Profile
    • uTasker
Re: conflicted define in modbus.c
« Reply #3 on: June 02, 2017, 12:23:08 AM »