Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macros feature #286

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading