I’ve just ported my capacitive touch library (called TouchLib) to the photon. The library reconfigures the ADC to use the internal sample and hold capacitor to measure capacitance on analog inputs and works pretty well for that purpose.
However, I cannot seem to combine my library with a normal analogRead() to read out a normal analog sensor, since my library has reconfigured the ADC for only 1 sample and no DMA.
I think it should be possible to also get analogRead() working again if my library calls HAL_ADC_DMA_Init() after taking the measurements, but this function is not exported in hal_dynalib_gpio.h.
Is there any other way without having to modify the hal and still get my library and analogRead() working together again?