Open andylinpersonal opened 1 year ago
+1
GPIO driver need improvements !
My need was to use own ISR handler, for getting 'timestamp' before any GPIO processing.
There is gpio_isr_register()
but it usage not documented, no examples and GPIO context used in driver is static (privat), imposible to use.
Had to create copy of GPIO context (hal, spinlock, etc) and not sure if it is safe.
Is your feature request related to a problem?
Problem I’d like to obtain the more detailed states of GPIO pins with stable, thread-safe public APIs rather than accessing through HAL/LL, or even reading the registers directly, e.g. current pull mode, direction, wakeup enabled, interrupt type, with active ISR handler, connected to RTC GPIO Mux or IO Mux, held or not, etc.
Hardware I have only one ESP32-S3-DevkitC-1-N32R8V v1.0
Describe the solution you'd like.
Add the following missing getter functions into
<driver/gpio.h>
<driver/rtc_io.h>
and HAL/LL layersDescribe alternatives you've considered.
Currently no. Some states can be read from their own registers despite bypassing the protection provided by the spinlock in the GPIO's context But others can’t be accessed without modifying esp-idf, e.g. Registered ISR handler held inside a static variable in a *.c file.
Additional context.
No response