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

Example codes #3

Open
peter1a opened this issue Feb 13, 2022 · 1 comment
Open

Example codes #3

peter1a opened this issue Feb 13, 2022 · 1 comment

Comments

@peter1a
Copy link

peter1a commented Feb 13, 2022

Hi, where I can find any example of usage?

@TD-er
Copy link
Owner

TD-er commented Feb 14, 2022

Actually this was more of an experiment for me to get familiar with maintaining a PlatformIO package.
ESPEasy Serial is used in... ESPEasy ;)
I don't think it currently is very easy to use this in other projects, without copying quite a lot of code chunks from ESPEasy.

In ESPEasy we have for each plugin 3 function calls that will interact with setting up the ESPEasySerial object:

  • PLUGIN_LOAD for generating the web interface to show the settings
  • PLUGIN_SAVE to store the settings set on the web interface
  • PLUGIN_INIT to apply the (new) settings.

There are helper functions/classes to help with the load/save part so the code can be very simple per plugin and most is handled from the ESPEasy calls from Plugin.cpp

When operating the serial layer, its functions are very similar to those in the HW serial classes.

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

No branches or pull requests

2 participants