diff --git a/src/machine/machine_nrf52xxx.go b/src/machine/machine_nrf52xxx.go index e0d9d152..f36a05a6 100644 --- a/src/machine/machine_nrf52xxx.go +++ b/src/machine/machine_nrf52xxx.go @@ -18,7 +18,7 @@ func InitADC() { } // Configure configures an ADC pin to be able to read analog data. -func (a ADC) Configure(ADCConfig) { +func (a ADC) Configure(config ADCConfig) { // Enable ADC. // The ADC does not consume a noticeable amount of current simply by being // enabled. @@ -27,13 +27,35 @@ func (a ADC) Configure(ADCConfig) { // Configure ADC. nrf.SAADC.RESOLUTION.Set(nrf.SAADC_RESOLUTION_VAL_12bit) - // Configure channel 0, which is the only channel we use. - nrf.SAADC.CH[0].CONFIG.Set(nrf.SAADC_CH_CONFIG_RESP_Bypass<