diff options
author | deadprogram <[email protected]> | 2022-11-20 20:48:55 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-11-21 08:53:21 +0100 |
commit | 217449df07923bc6d867b7894f974f934269e733 (patch) | |
tree | 7541f35520b02ad273a5ad5d701697169744c53a /src/machine/machine_stm32_adc_f1.go | |
parent | a7fc65861dc530e5503a640282e52a286f8b9342 (diff) | |
download | tinygo-217449df07923bc6d867b7894f974f934269e733.tar.gz tinygo-217449df07923bc6d867b7894f974f934269e733.zip |
machine/stm32f1, stm32f4: fix ADC by clearing the correct bit for rank after each read
Signed-off-by: deadprogram <[email protected]>
Diffstat (limited to 'src/machine/machine_stm32_adc_f1.go')
-rw-r--r-- | src/machine/machine_stm32_adc_f1.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/machine/machine_stm32_adc_f1.go b/src/machine/machine_stm32_adc_f1.go index fb0cee669..e2c82f623 100644 --- a/src/machine/machine_stm32_adc_f1.go +++ b/src/machine/machine_stm32_adc_f1.go @@ -75,7 +75,7 @@ func (a ADC) Get() uint16 { stm32.ADC1.SR.ClearBits(stm32.ADC_SR_EOC) // clear rank - stm32.ADC1.SMPR1.ClearBits(ch) + stm32.ADC1.SQR3.ClearBits(ch) return result } |