machine/rp: use the blockReset() and unresetBlockWait() helper functions for all peripheral reset/unreset operations

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2026-01-13 01:22:20 +01:00
committed by Ron Evans
parent ff58c50118
commit 8bd2233b57
4 changed files with 8 additions and 18 deletions
+2 -4
View File
@@ -19,10 +19,8 @@ var adcAref uint32
// InitADC resets the ADC peripheral.
func InitADC() {
rp.RESETS.RESET.SetBits(rp.RESETS_RESET_ADC)
rp.RESETS.RESET.ClearBits(rp.RESETS_RESET_ADC)
for !rp.RESETS.RESET_DONE.HasBits(rp.RESETS_RESET_ADC) {
}
resetBlock(rp.RESETS_RESET_ADC)
unresetBlockWait(rp.RESETS_RESET_ADC)
// enable ADC
rp.ADC.CS.Set(rp.ADC_CS_EN)
adcAref = 3300