I’m very new to the c language and am having some problems understanding a few things. first would some one please explain the following code to me?
unsigned _mbsCmdWord ( unsigned wOff );
I understand the variable decleration but what are the arguments in parenthesis for?
Second) I’m using the RCM3610 to make a MODBUS RTU slave device. I’ve been looking at the sample code and can’t figure out a few things.
From my main program I would call MODBUS_Serial_tick() in MODBUS_SLAVE.LIB.
When that function is finished and returned to the main program, where can I find the received command and data? Would somebody show me some example code for accessing this information?
1 : “first would some one please explain the following code to me?”
unsigned _mbsCmdWord ( unsigned wOff );
is the declaration of the “_mbsCmdWord” function, which take an unsigned argument, and return an unsigned value. The defintion of this function is in MODBUS_SLAVE.LIB too :
to print informations via “printf”. Look at your “MODBUS_Serial_Tx” definition : maybe another MODBUS_DEBUG_PRINT value will print another informations!