Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow custom _modbus_rtu_ioctl_rts function #23

Closed
karlp opened this Issue Sep 12, 2011 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

karlp commented Sep 12, 2011

The _modbus_rtu_ioctl_rts function is called when you are in rs485 mode, and does all the good things based on the config of the port and the wait times. However, it is hardcoded to send some fixed ioctls(), On my platform at least, I don't have a real RTS signal on the serial port to use, but I can emulate it with a GPIO.

I've got this working by hacking my own method into that file, but it's pretty ugly.

It might be nice if this could be specified as a function pointer to register to do this, rather than being hardcoded to send ioctl(fd, TIOCMSET, &flags);

Owner

stephane commented Nov 8, 2012

Other guys request for a configurable time MODBUS_RTU_TIME_BETWEEN_RTS_SWITCH so may be we can provide two hooks for this, before write and after write.

Owner

stephane commented Aug 27, 2015

Done by Kwarf.

@stephane stephane closed this Aug 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment