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
Added Hardware Up and Down RTS Setting for RS485. #594
base: master
Are you sure you want to change the base?
Conversation
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Mohamed Amine Mzoughi.
|
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient... |
@cla-bot check |
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient... |
The cla-bot has been summoned, and re-checked this pull request! |
This part was already complex but with the splitting between software and hardware, it's even more complex but I think you need it so it makes sense to add this code. As you proposed, proper documentation would be nice. |
@stephane When you merge my other PR, let me know so I can update my master branch so you can merge this if everything is good for you. On the other hand, if anyone needs this feature on Windows (I did it on Windows CE 7 in quick and dirty mode https://github.com/embeddedmz/libmodbus_trizeps_vii_arm_wince), in
Maybe, I will work on that issue one day (making modbus_rtu_set_rts function also works on Windows platform). |
@stephane the branch is now up to date and ready to be merged. |
Hello,
Actually, in libmodbus, there's only RTS up or down setting via software and its accuracy depends on RTS delay value.
In this pull request, I added the possibility to use hardware RTS up or down setting (using the serial driver).
I made my tests with ModRSim2 (Modbus slave simulator running on Windows 10) and the Trizeps 7 board running Ubuntu 18.04 (i.MX6 CPU, the serial driver/UART is related to that CPU).
If this is good for you, I will add the proper documentation before you accept my changes.
Best regards.