vroland / epdiy

EPDiy is a driver board for affordable e-Paper (or E-ink) displays.
https://vroland.github.io/epdiy-hardware/
GNU Lesser General Public License v3.0
1.25k stars 178 forks source link

Make GPIO 12 usable #222

Closed Fabian-Schmidt closed 9 months ago

Fabian-Schmidt commented 1 year ago

The epdiy library disables GPIO 12 on power down/off operation. Despite GPIO PIN 12 is not being used by any supported board for any operation within this library.

My supported LILYGO® T5-4.7 has only 4 free GPIO (12,13,14,15 - in two connectors on the upper left) and I need all of them. LILYGO® T5-4.7

GPIO 12 has limited usage as it is a strapping pin. I am using it as a UART Tx pin and it is working fine. (Cannot use it as UART Rx pin - if pulled high during boot ESP does not detect it has PSRAM).

This PR fixes issue #220

martinberlin commented 1 year ago

V6 PCB exposes IO12 as external IO:

V6 PCB exposes IO12 as external IO I think removing the GPIO12 isolate is OK but if I'm missing something please let me know @vroland @jdoubleu What I'm not sure if it's good to do it like this or is better to add a #ifdef constraint and do it only for Lilygo EPD47 board. Please clarify this point.

vroland commented 1 year ago

I belive disabling GPIO12 slightly lowers power draw in deep sleep, that's why we did it. But I can instead just add a hint to the docs and then merge it :)

Fabian-Schmidt commented 1 year ago

I can alter the PR to add an #ifdef so by default it is disabled, but if somebody needs GPIO12 they can use it.

martinberlin commented 1 year ago

I will make soon some tests but at the moment I've run out of V5 & V6 models and I guess this applies only to ESP32-WROVER and not to ESP32-S3 right. If the power different is just a few micro amps I guess it could be just left enabled since it won't make such a huge difference.

vroland commented 1 year ago

Could you maybe add the code that is deleted to the docs, mentioning that it can be added to optimize deep sleep consumption?

Fabian-Schmidt commented 1 year ago

Hi @vroland, I added to deleted code to the readme.

martinberlin commented 9 months ago

Sorry @Fabian-Schmidt lets close this MR and add this small change when https://github.com/vroland/epdiy/pull/251 is merged since the code changes significantly after that is merged