2020-09-22 16:03:43 +00:00
|
|
|
[package]
|
|
|
|
name = "embassy-nrf"
|
|
|
|
version = "0.1.0"
|
2022-06-18 00:15:48 +00:00
|
|
|
edition = "2021"
|
2022-10-07 10:41:56 +00:00
|
|
|
license = "MIT OR Apache-2.0"
|
2024-01-11 23:32:47 +00:00
|
|
|
description = "Embassy Hardware Abstraction Layer (HAL) for nRF series microcontrollers"
|
|
|
|
keywords = ["embedded", "async", "nordic", "nrf", "embedded-hal"]
|
2024-01-11 23:35:01 +00:00
|
|
|
categories = ["embedded", "hardware-support", "no-std", "asynchronous"]
|
2024-01-11 23:32:47 +00:00
|
|
|
repository = "https://github.com/embassy-rs/embassy"
|
|
|
|
documentation = "https://docs.embassy.dev/embassy-nrf"
|
2020-09-22 16:03:43 +00:00
|
|
|
|
2022-03-04 16:45:01 +00:00
|
|
|
[package.metadata.embassy_docs]
|
2022-04-05 19:05:09 +00:00
|
|
|
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-nrf-v$VERSION/embassy-nrf/src/"
|
2022-06-26 21:55:38 +00:00
|
|
|
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-nrf/src/"
|
2022-04-05 19:05:09 +00:00
|
|
|
|
2023-11-29 16:23:48 +00:00
|
|
|
features = ["time", "defmt", "unstable-pac", "gpiote", "time-driver-rtc1"]
|
2022-03-04 16:45:01 +00:00
|
|
|
flavors = [
|
2024-01-19 22:13:46 +00:00
|
|
|
{ regex_feature = "nrf51", target = "thumbv6m-none-eabi" },
|
2022-03-04 16:45:01 +00:00
|
|
|
{ regex_feature = "nrf52.*", target = "thumbv7em-none-eabihf" },
|
|
|
|
{ regex_feature = "nrf53.*", target = "thumbv8m.main-none-eabihf" },
|
|
|
|
{ regex_feature = "nrf91.*", target = "thumbv8m.main-none-eabihf" },
|
|
|
|
]
|
|
|
|
|
2024-01-11 22:16:28 +00:00
|
|
|
[package.metadata.docs.rs]
|
|
|
|
features = ["nrf52840", "time", "defmt", "unstable-pac", "gpiote", "time-driver-rtc1"]
|
2024-01-11 22:43:17 +00:00
|
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
2024-01-11 22:16:28 +00:00
|
|
|
|
2020-09-22 16:03:43 +00:00
|
|
|
[features]
|
2023-06-08 16:00:19 +00:00
|
|
|
default = ["rt"]
|
2023-12-22 22:37:29 +00:00
|
|
|
## Cortex-M runtime (enabled by default)
|
2023-06-08 16:00:19 +00:00
|
|
|
rt = [
|
2024-01-19 22:13:46 +00:00
|
|
|
"nrf51-pac?/rt",
|
2023-05-29 19:30:28 +00:00
|
|
|
"nrf52805-pac?/rt",
|
|
|
|
"nrf52810-pac?/rt",
|
|
|
|
"nrf52811-pac?/rt",
|
|
|
|
"nrf52820-pac?/rt",
|
|
|
|
"nrf52832-pac?/rt",
|
|
|
|
"nrf52833-pac?/rt",
|
|
|
|
"nrf52840-pac?/rt",
|
|
|
|
"nrf5340-app-pac?/rt",
|
|
|
|
"nrf5340-net-pac?/rt",
|
|
|
|
"nrf9160-pac?/rt",
|
|
|
|
]
|
2021-07-14 20:19:04 +00:00
|
|
|
|
2023-12-22 22:37:29 +00:00
|
|
|
## Enable features requiring `embassy-time`
|
2022-08-17 21:40:16 +00:00
|
|
|
time = ["dep:embassy-time"]
|
2022-05-02 22:43:59 +00:00
|
|
|
|
2023-12-22 22:37:29 +00:00
|
|
|
## Enable defmt
|
2023-11-29 16:23:48 +00:00
|
|
|
defmt = ["dep:defmt", "embassy-hal-internal/defmt", "embassy-sync/defmt", "embassy-usb-driver/defmt", "embassy-embedded-hal/defmt"]
|
2022-02-11 23:24:04 +00:00
|
|
|
|
2023-12-22 22:37:29 +00:00
|
|
|
## Reexport the PAC for the currently enabled chip at `embassy_nrf::pac` (unstable)
|
|
|
|
unstable-pac = []
|
2021-07-14 20:19:04 +00:00
|
|
|
# This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version.
|
|
|
|
# If this is an issue for you, you're encouraged to directly depend on a fixed version of the PAC.
|
|
|
|
# There are no plans to make this stable.
|
|
|
|
|
2023-12-22 22:37:29 +00:00
|
|
|
## Enable GPIO tasks and events
|
|
|
|
gpiote = []
|
|
|
|
|
|
|
|
## Use RTC1 as the time driver for `embassy-time`, with a tick rate of 32.768khz
|
|
|
|
time-driver-rtc1 = ["_time-driver"]
|
|
|
|
|
|
|
|
## Allow using the NFC pins as regular GPIO pins (P0_09/P0_10 on nRF52, P0_02/P0_03 on nRF53)
|
|
|
|
nfc-pins-as-gpio = []
|
|
|
|
|
|
|
|
## Allow using the RST pin as a regular GPIO pin.
|
2023-12-23 14:48:47 +00:00
|
|
|
## * nRF52805, nRF52810, nRF52811, nRF52832: P0_21
|
|
|
|
## * nRF52820, nRF52833, nRF52840: P0_18
|
2023-12-22 22:37:29 +00:00
|
|
|
reset-pin-as-gpio = []
|
|
|
|
|
|
|
|
## Implements the MultiwriteNorFlash trait for QSPI. Should only be enabled if your external
|
|
|
|
## flash supports the semantics described [here](https://docs.rs/embedded-storage/0.3.1/embedded_storage/nor_flash/trait.MultiwriteNorFlash.html)
|
|
|
|
qspi-multiwrite-flash = []
|
|
|
|
|
|
|
|
#! ### Chip selection features
|
2024-01-19 22:13:46 +00:00
|
|
|
## nRF51
|
2024-01-24 18:28:05 +00:00
|
|
|
nrf51 = ["nrf51-pac", "_nrf51"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF52805
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf52805 = ["nrf52805-pac", "_nrf52"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF52810
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf52810 = ["nrf52810-pac", "_nrf52"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF52811
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf52811 = ["nrf52811-pac", "_nrf52"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF52820
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf52820 = ["nrf52820-pac", "_nrf52"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF52832
|
2023-09-22 14:30:09 +00:00
|
|
|
nrf52832 = ["nrf52832-pac", "_nrf52", "_nrf52832_anomaly_109"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF52833
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf52833 = ["nrf52833-pac", "_nrf52", "_gpio-p1"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF52840
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf52840 = ["nrf52840-pac", "_nrf52", "_gpio-p1"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF5340 application core in Secure mode
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf5340-app-s = ["_nrf5340-app", "_s"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF5340 application core in Non-Secure mode
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf5340-app-ns = ["_nrf5340-app", "_ns"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF5340 network core
|
2021-10-28 01:07:06 +00:00
|
|
|
nrf5340-net = ["_nrf5340-net"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF9160 in Secure mode
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf9160-s = ["_nrf9160", "_s"]
|
2023-12-23 14:48:47 +00:00
|
|
|
## nRF9160 in Non-Secure mode
|
2023-01-23 00:48:35 +00:00
|
|
|
nrf9160-ns = ["_nrf9160", "_ns"]
|
2020-09-22 16:03:43 +00:00
|
|
|
|
2021-08-20 13:42:42 +00:00
|
|
|
# Features starting with `_` are for internal use only. They're not intended
|
|
|
|
# to be enabled by other crates, and are not covered by semver guarantees.
|
2021-10-26 15:11:51 +00:00
|
|
|
|
2021-10-28 01:07:06 +00:00
|
|
|
_nrf5340-app = ["_nrf5340", "nrf5340-app-pac"]
|
|
|
|
_nrf5340-net = ["_nrf5340", "nrf5340-net-pac"]
|
|
|
|
_nrf5340 = ["_gpio-p1", "_dppi"]
|
2021-10-26 15:11:51 +00:00
|
|
|
_nrf9160 = ["nrf9160-pac", "_dppi"]
|
2023-01-23 00:48:35 +00:00
|
|
|
_nrf52 = ["_ppi"]
|
2024-01-19 22:13:46 +00:00
|
|
|
_nrf51 = ["_ppi"]
|
2021-10-28 01:07:06 +00:00
|
|
|
|
2024-01-11 15:38:44 +00:00
|
|
|
_time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-32_768"]
|
2021-10-28 01:07:06 +00:00
|
|
|
|
2023-01-23 00:48:35 +00:00
|
|
|
# trustzone state.
|
|
|
|
_s = []
|
|
|
|
_ns = []
|
|
|
|
|
2021-10-13 14:35:05 +00:00
|
|
|
_ppi = []
|
|
|
|
_dppi = []
|
2021-10-28 01:07:06 +00:00
|
|
|
_gpio-p1 = []
|
2020-09-22 16:03:43 +00:00
|
|
|
|
2023-09-22 14:30:09 +00:00
|
|
|
# Errata workarounds
|
|
|
|
_nrf52832_anomaly_109 = []
|
|
|
|
|
2020-09-22 16:03:43 +00:00
|
|
|
[dependencies]
|
2024-01-11 15:38:44 +00:00
|
|
|
embassy-time-driver = { version = "0.1", path = "../embassy-time-driver", optional = true }
|
2024-01-11 21:57:29 +00:00
|
|
|
embassy-time = { version = "0.3.0", path = "../embassy-time", optional = true }
|
2023-12-04 13:03:30 +00:00
|
|
|
embassy-sync = { version = "0.5.0", path = "../embassy-sync" }
|
2023-07-28 11:23:22 +00:00
|
|
|
embassy-hal-internal = {version = "0.1.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-3"] }
|
2022-07-08 13:47:47 +00:00
|
|
|
embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" }
|
2023-11-29 16:23:48 +00:00
|
|
|
embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver" }
|
2020-11-01 16:17:24 +00:00
|
|
|
|
2022-01-26 23:08:02 +00:00
|
|
|
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
|
2023-12-26 16:38:34 +00:00
|
|
|
embedded-hal-1 = { package = "embedded-hal", version = "1.0" }
|
|
|
|
embedded-hal-async = { version = "1.0" }
|
2023-10-03 20:15:02 +00:00
|
|
|
embedded-io = { version = "0.6.0" }
|
2023-11-29 16:23:48 +00:00
|
|
|
embedded-io-async = { version = "0.6.1" }
|
2022-01-13 22:56:25 +00:00
|
|
|
|
2021-11-15 16:08:51 +00:00
|
|
|
defmt = { version = "0.3", optional = true }
|
2024-01-30 22:06:57 +00:00
|
|
|
bitflags = "2.4.2"
|
2021-09-10 22:10:46 +00:00
|
|
|
log = { version = "0.4.14", optional = true }
|
2021-08-18 22:56:11 +00:00
|
|
|
cortex-m-rt = ">=0.6.15,<0.8"
|
2022-08-14 21:16:06 +00:00
|
|
|
cortex-m = "0.7.6"
|
|
|
|
critical-section = "1.1"
|
2021-06-29 07:26:16 +00:00
|
|
|
rand_core = "0.6.3"
|
2021-10-18 13:24:31 +00:00
|
|
|
fixed = "1.10.0"
|
2023-12-04 12:47:21 +00:00
|
|
|
embedded-storage = "0.3.1"
|
2023-11-29 16:23:48 +00:00
|
|
|
embedded-storage-async = "0.4.0"
|
2021-10-28 01:07:06 +00:00
|
|
|
cfg-if = "1.0.0"
|
2023-12-22 22:37:29 +00:00
|
|
|
document-features = "0.2.7"
|
2020-09-22 16:03:43 +00:00
|
|
|
|
2024-01-19 22:13:46 +00:00
|
|
|
nrf51-pac = { version = "0.12.0", optional = true }
|
2023-07-05 21:54:45 +00:00
|
|
|
nrf52805-pac = { version = "0.12.0", optional = true }
|
|
|
|
nrf52810-pac = { version = "0.12.0", optional = true }
|
|
|
|
nrf52811-pac = { version = "0.12.0", optional = true }
|
|
|
|
nrf52820-pac = { version = "0.12.0", optional = true }
|
|
|
|
nrf52832-pac = { version = "0.12.0", optional = true }
|
|
|
|
nrf52833-pac = { version = "0.12.0", optional = true }
|
|
|
|
nrf52840-pac = { version = "0.12.0", optional = true }
|
2023-05-29 19:30:28 +00:00
|
|
|
nrf5340-app-pac = { version = "0.12.0", optional = true }
|
|
|
|
nrf5340-net-pac = { version = "0.12.0", optional = true }
|
|
|
|
nrf9160-pac = { version = "0.12.0", optional = true }
|