diff --git a/nrf-softdevice/Cargo.toml b/nrf-softdevice/Cargo.toml index 4b92a7d..3f276d2 100644 --- a/nrf-softdevice/Cargo.toml +++ b/nrf-softdevice/Cargo.toml @@ -11,6 +11,7 @@ keywords = ["arm", "cortex-m", "nrf52", "nrf-softdevice"] rust-version = "1.76" [features] +default = ["macros"] nrf52805 = [] nrf52810 = [] @@ -39,6 +40,8 @@ critical-section-impl = ["critical-section/restore-state-bool"] usable-from-interrupts = [] +macros = ["dep:nrf-softdevice-macro"] + # Workaround l2cap credit bug. If set, infinite credits are issued # to the peer in batches. The `credits` config when establishing the channel is ignored. # https://devzone.nordicsemi.com/f/nordic-q-a/81894/s140-7-3-0-softdevice-assertion-failed-at-pc-0xa806-using-l2cap @@ -68,7 +71,7 @@ nrf-softdevice-s122 = { version = "0.1.1", path = "../nrf-softdevice-s122", opti nrf-softdevice-s132 = { version = "0.1.1", path = "../nrf-softdevice-s132", optional = true } nrf-softdevice-s140 = { version = "0.1.1", path = "../nrf-softdevice-s140", optional = true } -nrf-softdevice-macro = { version = "0.1.0", path = "../nrf-softdevice-macro" } +nrf-softdevice-macro = { version = "0.1.0", path = "../nrf-softdevice-macro", optional = true } [package.metadata.docs.rs] targets = ["thumbv7em-none-eabi"] diff --git a/nrf-softdevice/src/lib.rs b/nrf-softdevice/src/lib.rs index 7b78d22..e91799b 100644 --- a/nrf-softdevice/src/lib.rs +++ b/nrf-softdevice/src/lib.rs @@ -153,6 +153,7 @@ mod temperature; pub use temperature::temperature_celsius; mod random; +#[cfg(feature = "macros")] pub use nrf_softdevice_macro::*; pub use random::random_bytes;