libDaisy
libDaisy copied to clipboard
MAX11300: replace GPI mode with ADC mode and compare in software
Problem: When configuring a MAX11300 PIXI pin as a digital input, and then sending negative voltages to that pin, all ADC readings turn into garbage.
Solution: Inside of the MAX11300, GPI pins are really just ADC inputs with an internal comparison to a threshold value. We could configure a GPI pin as an ADC pin and do that comparison in our driver.
Edit: Check if the same is true for DAC pins - it would streamline the driver and generate less interrupts, if we could skip the GPO update step and handle GPO and DAC in one single DMA transmission.