OpenWrt Forum Archive

Topic: GPIO Information

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Sorry, I know this is probably going to bother people, but I can't find anything anywhere.

I understand that the GPIOs can be used as digital input, digital output, and even i2C busses.

Can anyone tell me where I can find information on how to program GPIO ports? Are there existing templates or tutorials in regards to implementing such a thing?

Also, I'd like to know if they're capable of analogue input as well? I want to have a thermocouple connection and don't know if I need to get a ADC that works over i2C or what the best option is.

GPIO programming depends on the SoC. Usually you have a direction (input, output) and a data register for a set of GPIO.
Look into the datasheet of the SoC or in the Linux kernel sources if your hardware is supported.

AFAIK GPIO never support analogue input. Some SoC contain ADC. If yours doesn't, a separate ADC with SPI, i2C or 1-wire
interface should be used.

Does anyone know where I can start for the Meraki Mini's GPIO? I have OpenWRt on my Meraki but it doesn't appear to have any existing GPIO definitions.

The discussion might have continued from here.