┬ÁTasker Forum

┬ÁTasker Forum => MODBUS => Topic started by: Kiger on June 01, 2017, 08:45:49 AM

Title: conflicted define in modbus.c
Post by: Kiger 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



Title: Re: conflicted define in modbus.c
Post by: mark 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

Title: Re: conflicted define in modbus.c
Post by: Kiger 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
Title: Re: conflicted define in modbus.c
Post by: mark on June 02, 2017, 12:23:08 AM
Hi

I added it here: http://www.utasker.com/forum/index.php?topic=1424.msg5466#msg5466

Regards

Mark