Open
Description
In wiring_analog.c, analogRead() disables the DAC if analogWrite() was previously used to enabled the DAC on the same pin.
In my situation, I am writing a value out the DAC and reading back in on the same pin using the ADC, as part of ADC calibration. Therefore, I don't want the DAC disabled.
A suggested fix is to add another function that is a copy of analogRead() with a new name (e.g. analogReadOptionalDisable()) with an additional argument 'bool disableDAC'. Use the argument to decide whether to disable the DAC or not. Change analogRead() to call this function with the argument 'true'.
Metadata
Metadata
Assignees
Labels
No labels