machine/stm32f1, stm32f4: fix ADC by clearing the correct bit for rank after each read
Signed-off-by: deadprogram <ron@hybridgroup.com>
Этот коммит содержится в:
родитель
a7fc65861d
коммит
217449df07
2 изменённых файлов: 2 добавлений и 2 удалений
|
@ -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
|
||||
}
|
||||
|
|
|
@ -70,7 +70,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
|
||||
}
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче