diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-10-11 00:55:31 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-10-11 00:55:31 +0200 |
| commit | 668364da9ce97e924be9aceca4cc8a6bfb286eb4 (patch) | |
| tree | bdcebd75e79c17186b771ab37cead085a6899d3c /embassy-nrf/src/saadc.rs | |
| parent | 0b26ab7bbc0be784c011118574a84132d6747618 (diff) | |
nrf/saadc: nrf52805 only has 2 channels
Diffstat (limited to 'embassy-nrf/src/saadc.rs')
| -rw-r--r-- | embassy-nrf/src/saadc.rs | 9 |
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")] |
| 249 | input_mappings! { | 249 | input_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")] | ||
| 260 | input_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")))] |
| 261 | input_mappings! { | 266 | input_mappings! { |
| 262 | ANALOGINPUT0 => P0_02, | 267 | ANALOGINPUT0 => P0_02, |
| 263 | ANALOGINPUT1 => P0_03, | 268 | ANALOGINPUT1 => P0_03, |
