Open Dominaezzz opened 1 month ago
See https://github.com/esp-rs/esp-hal/pull/1684 . Inversion shouldn't be implemented per peripheral but should be a general thing.
We also really should have "route a peripheral output and some number of inputs to the same pin" - currently I'm hacking around esp-hal when doing 1-wire with the rmt peripheral to get the right configuration and it'd be good to have a proper solution.
GPIO matrix will be a great addition, many great hacks around RMT/I2S etc etc can be enabled by the GPIO matrix.
Another peripheral specific example of GPIO matrix features. https://github.com/esp-rs/esp-hal/blob/d0cd890e51c16b61707f7cce16f21fa7478fbdcf/esp-hal/src/pcnt/channel.rs#L69-L98
Another use case is I2C/SPI on multiple pins. This significantly improves board routing and allows much better signal integrity by avoiding long buses.
At the moment, the drivers in the HAL take GPIO pins for each peripheral signal, which works for most cases.
However the ESP32 can also:
A use case for number 3 is #1515. Users should have the option to set a signal to a constant value instead of a GPIO pin. A use case for number 1 is to be able to route the vsync pin to the I2sCamera driver and also listen for interrupts on the pin with
Input
. Also see https://github.com/bjoernQ/esp-hal/pull/1 .