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

HAL for espressif #549

Open
Zaltora opened this issue Jan 18, 2018 · 1 comment
Open

HAL for espressif #549

Zaltora opened this issue Jan 18, 2018 · 1 comment

Comments

@Zaltora
Copy link
Contributor

Zaltora commented Jan 18, 2018

the esp-open-rtos project has a lot of component libraries that could be used in several SDKs as well as esp32.
Would it be a good idea to create a standard I2C / SPI / PWM / GPIO / I2S / ... interface ?
a component that would be called by each library. A large part of extras folder will be portable. (I think especially to sensors libraries).
Would the idea of creating a separate repository for these modules be a good idea too?
I see that already libraries are thought to be portable on esp32. Myself, I carry some libraries from here.

@vortex314
Copy link

vortex314 commented Jan 18, 2018

My 2 cents : Nice idea, the way I approached it was by creating in C++ some abstract base classes that on each platform differ in implementation. https://github.com/vortex314/Vertx-ESP8266/blob/master/Hardware.h
On an hardware level I standardized on UEXT connectors , so the sensors/ drivers are interchangeable between ESP8266 and ESP32 ( theoretically ) Still work in evolution.
On an ESP32 I have 3 x UEXT connectors and on an ESP8266 1x UEXT.
The UEXT 1-> 3 is reflected by the Connector class which can provide Uart,SPI,.. classes as a factory.

So that a device just indicates on which connector it sits and should work : https://github.com/vortex314/esp-ebos/blob/master/main/HCSR04.h

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