Skip to content

Commit

Permalink
Merge pull request #286 from NZRosto/macros-feature
Browse files Browse the repository at this point in the history
Add macros feature
  • Loading branch information
alexmoon authored Jan 8, 2025
2 parents 93ad991 + 9678ea6 commit bb1600b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nrf-softdevice/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ keywords = ["arm", "cortex-m", "nrf52", "nrf-softdevice"]
rust-version = "1.76"

[features]
default = ["macros"]

nrf52805 = []
nrf52810 = []
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Expand Down
1 change: 1 addition & 0 deletions nrf-softdevice/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit bb1600b

Please sign in to comment.