New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for user defined RTS toggle function #189

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@Kwarf
Contributor

Kwarf commented Jan 15, 2014

This patch allows users to register a custom callback function to set the RTS pin. This is handy on embedded systems where hardware RTS is not available, allowing the use of GPIO or raw register access instead.

By default it is mapped to call _modbus_rtu_ioctl_rts so it doesn't change the current functionality.

This is more or less a cleaned up version of remakeelectric/libmodbus@306e7ab for which I couldn't find a pull request. This relates to #156 and #23.

@ghost ghost assigned stephane Jan 28, 2014

@stephane

This comment has been minimized.

stephane commented on doc/modbus_rtu_set_custom_rts.txt in ba5ecf9 Feb 13, 2015

I think I could remove my name here.

@stephane

This comment has been minimized.

stephane commented on ba5ecf9 Feb 13, 2015

Seems good to me.

This comment has been minimized.

stephane replied Aug 27, 2015

Thank you very much. Merged.
stephane@a8676b7

@stephane

This comment has been minimized.

Owner

stephane commented Feb 18, 2015

@Kwarf I'm willing to merge your patch but you need to accept the libmodbus CLA first (sent by mail, it will be available on web site soon).

@stephane

This comment has been minimized.

Owner

stephane commented Aug 27, 2015

Thank you very much. Merged.
a8676b7

@stephane stephane closed this Aug 27, 2015

@stephane stephane modified the milestones: v3.2.0, v3.4.0 Aug 27, 2015

@karlp

This comment has been minimized.

Contributor

karlp commented Aug 27, 2015

just a note, the docs for this will need updating when ASCII support comes in, as this is a serial setting, not a RTU setting.

@stephane

This comment has been minimized.

Owner

stephane commented Aug 27, 2015

Good catch it could be a good idea to merge ASCII support for 3.2 to avoid
further api changes later.
Le 27 août 2015 2:16 PM, "Karl Palsson" notifications@github.com a écrit :

just a note, the docs for this will need updating when ASCII support comes
in, as this is a serial setting, not a RTU setting.


Reply to this email directly or view it on GitHub
#189 (comment).

@noeldum

This comment has been minimized.

noeldum commented Jul 4, 2016

Jimmy, Thanks a lot for adding that feature. I tried to use the function but only got segfault so far.
Would you have any simple example of use?
I posted this issue a while ago on the google group here.

I seem to get an issue with defining a rts function outside of modbus-rtu.c. If I include that rts function inside modbus-rtu.c all works fine.

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