aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/saadc.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-10-11 00:55:31 +0200
committerDario Nieuwenhuis <[email protected]>2021-10-11 00:55:31 +0200
commit668364da9ce97e924be9aceca4cc8a6bfb286eb4 (patch)
treebdcebd75e79c17186b771ab37cead085a6899d3c /embassy-nrf/src/saadc.rs
parent0b26ab7bbc0be784c011118574a84132d6747618 (diff)
nrf/saadc: nrf52805 only has 2 channels
Diffstat (limited to 'embassy-nrf/src/saadc.rs')
-rw-r--r--embassy-nrf/src/saadc.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/embassy-nrf/src/saadc.rs b/embassy-nrf/src/saadc.rs
index 96116b36a..2f2baefae 100644
--- a/embassy-nrf/src/saadc.rs
+++ b/embassy-nrf/src/saadc.rs
@@ -245,7 +245,7 @@ macro_rules! input_mappings {
245 245
246// TODO the variant names are unchecked 246// TODO the variant names are unchecked
247// the inputs are copied from nrf hal 247// the inputs are copied from nrf hal
248#[cfg(feature = "9160")] 248#[cfg(feature = "nrf9160")]
249input_mappings! { 249input_mappings! {
250 ANALOGINPUT0 => P0_13, 250 ANALOGINPUT0 => P0_13,
251 ANALOGINPUT1 => P0_14, 251 ANALOGINPUT1 => P0_14,
@@ -256,8 +256,13 @@ input_mappings! {
256 ANALOGINPUT6 => P0_19, 256 ANALOGINPUT6 => P0_19,
257 ANALOGINPUT7 => P0_20, 257 ANALOGINPUT7 => P0_20,
258} 258}
259#[cfg(feature = "nrf52805")]
260input_mappings! {
261 ANALOGINPUT2 => P0_04,
262 ANALOGINPUT3 => P0_05,
263}
259 264
260#[cfg(not(feature = "9160"))] 265#[cfg(not(any(feature = "nrf52805", feature = "nrf9160")))]
261input_mappings! { 266input_mappings! {
262 ANALOGINPUT0 => P0_02, 267 ANALOGINPUT0 => P0_02,
263 ANALOGINPUT1 => P0_03, 268 ANALOGINPUT1 => P0_03,