From 9f870a5edf08c4322a6535d07f6444341fbf4c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Alse=CC=81r?= Date: Tue, 15 Nov 2022 16:31:19 +0100 Subject: [PATCH] Cleanup --- embassy-rp/src/adc.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/embassy-rp/src/adc.rs b/embassy-rp/src/adc.rs index acef4dea..cdb752dc 100644 --- a/embassy-rp/src/adc.rs +++ b/embassy-rp/src/adc.rs @@ -120,14 +120,9 @@ impl<'d> Adc<'d> { pub fn blocking_read, ID = u8>>(&mut self, _pin: &mut PIN) -> u16 { let r = Self::regs(); - let ch = PIN::channel(); unsafe { - if ch == 4 { - r.cs().modify(|w| w.set_ts_en(true)) - } - while !r.cs().read().ready() {} r.cs().modify(|w| { - w.set_ainsel(ch); + w.set_ainsel(PIN::channel()); w.set_start_once(true) }); while !r.cs().read().ready() {}