Page 1 of 1

Reading IO configuration

Posted: Fri Jul 31, 2020 6:19 am
by philippe_44
Hi - It might sound a bit a silly question, but is there a way to read/probe IO configuration? The reason is that some part of my large application need to probe HW environment by configuring some IO to I2C and trying to read something. But these IO might already have been configured for another use (e.g. SPI) and in that case I don't want to try I2C as I will un-program the SPI mapping. I can't have create a set of globals that keep track of what has been configured...

Re: Reading IO configuration

Posted: Fri Jul 31, 2020 7:31 am
by ESP_Sprite
Technically, you could read from the IO mux registers / GPIO matrix configuration registers for those particular GPIOs and see how they're configured, but there is no 'nice' way to do this with some esp-idf API.