-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Arduino abstraction layer #22
Comments
This commit starts the work on the Arduino Abstraction by moving all of the platform specific includes into separate header files. Because of this support for new platforms can be added without the need to change anything on the controller. It also cleans up a lot of duplicate code, because several places had to check if the Arduino platform is available.
This feature is developed on the abstraction-layer branch. Look there for the latest state of the code. |
The LedController now uses the SPI abstraction layer. Everything should work as before but the code is not tested on real hardwawre yet. Next up is getting this working on a raspberry pi.
This commit adds the meson build system and support for the raspberry pi using the ArduioRaspi library. That library was developed for this specific case so there shouldn't be any problems with the LedController and it. At the moment there is no support for hardware SPI for the raspberry pi but that will be added in the near future.
LedController now works on the raspberry pi but hardware SPI is not supported yet (it will come soon) |
The abstraction layer is now a separate library. |
The changes are now on the abstraction-layer branch. |
One of the features that could increase compatibility to almost 100% would be to write a custom
SPIArduino layer.Except for
Arduino.h
andSPI.h
are the only dependencies, but they do not exist for a lot of board (eq. raspberry PI).A custom Arduino layer would always use 'software' SPI if there is no hardware support or try to use another SPI implementation.
Like the rest of the LedController v2+, it should be implemented as header only code, maybe even as singleton.This Layer should be the only place that is depended on Hardware specific code.
In the future this layer may be used to allow more frameworks/boards to work with this library.
The header of this layer should define a generic interface, while the source files handle the platform specific implementation of that generic interface.
The library will not be portable from one platform to the next without recompiling but this makes a lot of code simpler
The features it needs to implement are the following:
Help with this appreciated.
The text was updated successfully, but these errors were encountered: