-
Notifications
You must be signed in to change notification settings - Fork 55
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
Multiple HALs #95
Comments
I'll provide an example showing how to drive built-in ESP32 PWM's and an PCA9685 driver in the next days. |
Driving PCA9685 (creating new HAL) is not a problem. I want to have std::list of different HAL types. |
Could you please provide an example what the exact problem is ( |
There is no (abstract) base class/interface that coul be used. |
There is intentionally no base class to keep the memory footprint low. But coincidentially I am working on a feature allowing to stuff different objects like |
Well, for test, I de-templated your TLed class and made it abstract adding two virtual functions: analogWrite() and millis() and now I can create derived class from public TLed and implement those two funcions just like you do it in separate hal class. Problem solved... now I can have std::list<TLed *>() |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Is it possible to implement multiple HALs ont he same board/project?
For example, I have ESP32 board with PCA9635 I2C driver and I want to use them both using JLed library at the same time, e.g. some LEDs are connected to ESP32 pins, and some are connected to PCA9635.
I have created custom HAL class but I dont know how to instantiate both HALs at the same time.
The text was updated successfully, but these errors were encountered: