diff options
| author | Christian Perez Llamas <[email protected]> | 2022-11-10 23:13:01 +0100 |
|---|---|---|
| committer | Christian Perez Llamas <[email protected]> | 2022-11-10 23:13:01 +0100 |
| commit | 4a2e810485a996014999ad630a604c3fe4fc81a4 (patch) | |
| tree | 1e7a894d50d63f4e66cd603e41bddce26aabe9ca | |
| parent | f22f36f51ba4466dd15df78df0ad86ac96f9051c (diff) | |
Restrict to pacs supporting i2s
| -rw-r--r-- | embassy-nrf/Cargo.toml | 1 | ||||
| -rw-r--r-- | embassy-nrf/src/lib.rs | 6 | ||||
| -rw-r--r-- | examples/nrf/Cargo.toml | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index aa1576fd4..67b6bec40 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -48,7 +48,6 @@ nrf9160-s = ["_nrf9160"] | |||
| 48 | nrf9160-ns = ["_nrf9160"] | 48 | nrf9160-ns = ["_nrf9160"] |
| 49 | 49 | ||
| 50 | gpiote = [] | 50 | gpiote = [] |
| 51 | i2s = [] | ||
| 52 | time-driver-rtc1 = ["_time-driver"] | 51 | time-driver-rtc1 = ["_time-driver"] |
| 53 | 52 | ||
| 54 | # Features starting with `_` are for internal use only. They're not intended | 53 | # Features starting with `_` are for internal use only. They're not intended |
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index ac797db9b..95bd5831b 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs | |||
| @@ -74,7 +74,11 @@ pub mod buffered_uarte; | |||
| 74 | pub mod gpio; | 74 | pub mod gpio; |
| 75 | #[cfg(feature = "gpiote")] | 75 | #[cfg(feature = "gpiote")] |
| 76 | pub mod gpiote; | 76 | pub mod gpiote; |
| 77 | // #[cfg(all(feature = "i2s", feature = "nrf52840"))] | 77 | #[cfg(any( |
| 78 | feature = "nrf52832", | ||
| 79 | feature = "nrf52833", | ||
| 80 | feature = "nrf52840", | ||
| 81 | ))] | ||
| 78 | pub mod i2s; | 82 | pub mod i2s; |
| 79 | #[cfg(not(any(feature = "_nrf5340", feature = "_nrf9160")))] | 83 | #[cfg(not(any(feature = "_nrf5340", feature = "_nrf9160")))] |
| 80 | pub mod nvmc; | 84 | pub mod nvmc; |
diff --git a/examples/nrf/Cargo.toml b/examples/nrf/Cargo.toml index a79044e8e..c633f82f5 100644 --- a/examples/nrf/Cargo.toml +++ b/examples/nrf/Cargo.toml | |||
| @@ -14,7 +14,7 @@ embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | |||
| 14 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 14 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } |
| 15 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } | 15 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } |
| 16 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 16 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 17 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "i2s", "unstable-pac"] } | 17 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } |
| 18 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "pool-16"], optional = true } | 18 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "pool-16"], optional = true } |
| 19 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"], optional = true } | 19 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"], optional = true } |
| 20 | embedded-io = "0.3.1" | 20 | embedded-io = "0.3.1" |
