Reading IO configuration
-
- Posts: 26
- Joined: Thu May 23, 2019 3:05 pm
Reading IO configuration
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...
-
- Posts: 9715
- Joined: Thu Nov 26, 2015 4:08 am
Re: Reading IO configuration
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.
Who is online
Users browsing this forum: Bing [Bot] and 435 guests