tuupola / hagl

Hardware Agnostic Graphics Library for embedded
https://www.appelsiini.net/tags/hagl/
MIT License
302 stars 49 forks source link

Esp8266 support? #105

Open colesnicov opened 1 year ago

colesnicov commented 1 year ago

Hello. Is esp8266-rtos-sdk supported?

tuupola commented 1 year ago

I am not sure how different that is from ESP-IDF. I am pretty sure they are not compatible? But I guess the ESP-IDF version could be used as basis for porting the needed abstraction layer. You need to provide only init and putpixel functions. Anything else is extra to make things faster. GD is an example of simple implementation.

https://github.com/tuupola/hagl_gd https://github.com/tuupola/hagl_esp_mipi

tuupola commented 1 year ago

For SPI displays 90% of work is porting this file:

https://github.com/tuupola/hagl_pico_mipi/blob/master/mipi_display.c https://github.com/tuupola/hagl_esp_mipi/blob/master/src/mipi_display.c https://github.com/tuupola/hagl_gd32v_mipi/blob/master/src/mipi_display.c https://github.com/tuupola/hagl_k210_mipi/blob/master/mipi_display.c

Currently the Pico version is probably the cleanest code and good for using as basis.

colesnicov commented 1 year ago

So I'll try it and let it lead. Otherwise, I ask because ESP8266-RTOS has a slightly different SPI API than ESP-IDF.

tuupola commented 1 year ago

Yeah I never tried it myself. I jumped straight into ESP32.

colesnicov commented 1 year ago

Yes Yes Yes. I also started with ESP32 but I have a lot of wemos d1 that I have to use. otherwise, I have a functional GFX, but I'm looking for something more abstract... without complicated porting between ESP8266 and ESP32. so that I don't have two different projects just because of the tft display.. as soon as I use up the ESP8266, I'll switch to the ESP32 (c2, c3, etc.)