Skip to content
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

Small compatibility improvements for esp32 embedded platforms #741

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fedepell
Copy link

@fedepell fedepell commented Apr 2, 2024

This PR adds a few small compatibility improvements for embedded platforms, specifically for the esp32 family using ESP-IDF, which are based on lwip. With these small modifications and by providing an external nanosleep (no need to pollute libmodbus as one can provide it externally in the project) then the library can be used in TCP mode in ESP-IDF.

The changes are not enough for using it with serial ports, I may send another PR for that (it will be a little more complicated as there we need to change the init part using the UART library for that system).

Would you be interested to have that in case in the codebase? (of course with a separate #define to replace the modbus_rtu_connect when one chooses that specific platform, a bit like you already have WIN32/Posix differentiation)

Some environments, for example lwip, don't have it, so let's make
it configurable so we can also build and work on those platforms
by simplying using project configuration.
Check via usual autoconf and when not present print just the error
code instead of the readable string. Useful for compact embedded
stacks where this is not present.
Copy link

cla-bot bot commented Apr 2, 2024

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...

@fedepell fedepell mentioned this pull request May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant