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

Draft: version bumps in dependencies #20

Merged
merged 11 commits into from
Jun 23, 2023
11 changes: 4 additions & 7 deletions btmesh-device/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ edition = "2021"

[dependencies]
heapless = "0.7"
btmesh-common = { path = "../btmesh-common"}
btmesh-models = { path = "../btmesh-models"}
embassy-sync = { version = "0.1.0", default-features = false }
btmesh-common = { path = "../btmesh-common" }
btmesh-models = { path = "../btmesh-models" }
embassy-sync = { version = "0.2.0", default-features = false }
embassy-time = { version = "0.1.0", default-features = false }
embassy-futures = { version = "0.1.0", default-features = false }
futures = { version = "0.3.21", default-features = false }
Expand All @@ -19,7 +19,4 @@ log = { version = "0.4", optional = true }
defmt = { version = "0.3", optional = true }

[features]
defmt = [
"dep:defmt",
"heapless/defmt-impl",
]
defmt = ["dep:defmt", "heapless/defmt-impl"]
77 changes: 33 additions & 44 deletions btmesh-driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ btmesh-common = { path = "../btmesh-common" }
btmesh-pdu = { path = "../btmesh-pdu" }
btmesh-bearer = { path = "../btmesh-bearer" }
btmesh-device = { path = "../btmesh-device" }
btmesh-models = { path = "../btmesh-models", features = [ "serde" ] }
btmesh-macro = { path = "../btmesh-macro"}
btmesh-models = { path = "../btmesh-models", features = ["serde"] }
btmesh-macro = { path = "../btmesh-macro" }
embassy-time = { version = "0.1.0", default-features = false }
embassy-sync = { version = "0.1.0", default-features = false, features = ["nightly"] }
embassy-sync = { version = "0.2.0", default-features = false, features = [
"nightly",
] }
critical-section = { version = "1.1.1", default-features = false, optional = true }
embassy-futures = { version = "0.1.0", default-features = false }
heapless = "0.7"
hash32 = "0.2.1"
Expand All @@ -24,55 +27,41 @@ cmac = { version = "0.6.0", default-features = false }
aes = { version = "0.7", default-features = false }
p256 = { version = "0.10.0", default-features = false, features = ["ecdh"] }
rand_core = { version = "0.6.2", default-features = false }
embedded-storage-async = { version = "0.3.0", optional = true }
embedded-storage-async = { version = "0.4.0", optional = true }
embedded-storage = { version = "0.3.0", optional = true }
postcard = { version = "1.0.1", default-features = false, features = ["heapless"], optional = true }
postcard = { version = "1.0.1", default-features = false, features = [
"heapless",
], optional = true }
defmt = { version = "0.3", optional = true }

[dev-dependencies]
rand_core = { version = "0.6.2", default-features = false, features = ["getrandom"] }
rand_core = { version = "0.6.2", default-features = false, features = [
"getrandom",
] }

[features]
default = [
"flash",
"memory",
"relay",
"std",
]
std = [
"embassy-time/std"
]
default = ["flash", "memory", "relay", "std"]
std = ["embassy-time/std", "critical-section/std"]
flash = [
"embedded-storage",
"embedded-storage-async",
"postcard",
"postcard/use-defmt",
"serde/derive",
"btmesh-common/serde",
"btmesh-pdu/serde"
]
memory = [

"embedded-storage",
"embedded-storage-async",
"postcard",
"postcard/use-defmt",
"serde/derive",
"btmesh-common/serde",
"btmesh-pdu/serde",
]
memory = []
defmt = [
"dep:defmt",
"btmesh-common/defmt",
"btmesh-bearer/defmt",
"btmesh-device/defmt",
"btmesh-models/defmt",
"btmesh-pdu/defmt",
"dep:defmt",
"btmesh-common/defmt",
"btmesh-bearer/defmt",
"btmesh-device/defmt",
"btmesh-models/defmt",
"btmesh-pdu/defmt",
]

relay = [
"btmesh-common/relay",
"btmesh-models/relay",
]
proxy = [
"btmesh-common/proxy",
]
friend = [
"btmesh-common/friend",
]
low_power = [
"btmesh-common/low_power",
]
relay = ["btmesh-common/relay", "btmesh-models/relay"]
proxy = ["btmesh-common/proxy"]
friend = ["btmesh-common/friend"]
low_power = ["btmesh-common/low_power"]
1 change: 1 addition & 0 deletions btmesh-driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#![allow(dead_code)]
#![allow(clippy::await_holding_refcell_ref)]
#![feature(async_closure)]
#![feature(impl_trait_in_assoc_type)]

use btmesh_bearer::beacon::Beacon;
use btmesh_common::address::{Address, UnicastAddress};
Expand Down
8 changes: 4 additions & 4 deletions btmesh-driver/src/storage/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::storage::{BackingStore, StorageError};
use crate::util::hash::hash_of;
use crate::ProvisionedConfiguration;
use core::future::Future;
use embedded_storage_async::nor_flash::AsyncNorFlash;
use embedded_storage_async::nor_flash::NorFlash;
use postcard::{from_bytes, to_slice};

#[repr(align(4))]
Expand All @@ -14,7 +14,7 @@ pub enum LatestLoad {
Provisioned { hash: u64, sequence: u32 },
}

pub struct FlashBackingStore<F: AsyncNorFlash, const PAGE_SIZE: u32 = 4096> {
pub struct FlashBackingStore<F: NorFlash, const PAGE_SIZE: u32 = 4096> {
flash: F,
base_address: u32,
extra_base_address: Option<u32>,
Expand All @@ -23,7 +23,7 @@ pub struct FlashBackingStore<F: AsyncNorFlash, const PAGE_SIZE: u32 = 4096> {
buffer: AlignedBuffer<USEFUL_BUFFER_SIZE>,
}

impl<F: AsyncNorFlash, const PAGE_SIZE: u32> FlashBackingStore<F, PAGE_SIZE> {
impl<F: NorFlash, const PAGE_SIZE: u32> FlashBackingStore<F, PAGE_SIZE> {
pub fn new(
flash: F,
base_address: u32,
Expand Down Expand Up @@ -77,7 +77,7 @@ impl<F: AsyncNorFlash, const PAGE_SIZE: u32> FlashBackingStore<F, PAGE_SIZE> {

const USEFUL_BUFFER_SIZE: usize = 2048;

impl<F: AsyncNorFlash, const PAGE_SIZE: u32> BackingStore for FlashBackingStore<F, PAGE_SIZE> {
impl<F: NorFlash, const PAGE_SIZE: u32> BackingStore for FlashBackingStore<F, PAGE_SIZE> {
type LoadFuture<'m> = impl Future<Output = Result<ProvisionedConfiguration, StorageError>> + 'm
where
Self: 'm;
Expand Down
80 changes: 39 additions & 41 deletions btmesh-nrf-softdevice/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,67 +12,65 @@ edition = "2021"
btmesh-common = { path = "../btmesh-common", default-features = false }
btmesh-pdu = { path = "../btmesh-pdu", default-features = false }
btmesh-bearer = { path = "../btmesh-bearer", default-features = false }
btmesh-driver = { path = "../btmesh-driver", default-features = false, features = [ "flash" ] }
btmesh-driver = { path = "../btmesh-driver", default-features = false, features = [
"flash",
] }
btmesh-device = { path = "../btmesh-device", default-features = false }
heapless = "0.7"
atomic-polyfill = { version = "1", default-features = false }
rand_core = { version = "0.6.2", default-features = false }
embassy-sync = { version = "0.1.0", default-features = false, features = ["nightly" ] }
embassy-sync = { version = "0.2.0", default-features = false, features = [
"nightly",
] }
embassy-futures = { version = "0.1.0", default-features = false }
nrf-softdevice = { version = "0.1.0", default-features = false, features = ["ble-peripheral", "ble-gatt-server"] }
nrf-softdevice-s140 = { version = "0.1.0", optional=true }
nrf-softdevice = { version = "0.1.0", default-features = false, features = [
"nightly",
"ble-peripheral",
"ble-gatt-server",
] }
nrf-softdevice-s140 = { version = "0.1.0", optional = true }
nrf-softdevice-macro = { version = "0.1.0" }
defmt = { version = "0.3", optional = true }
embassy-nrf = { version = "0.1.0", default-features = false, features = ["time-driver-rtc1", "gpiote"], optional = true }
embassy-nrf = { version = "0.1.0", default-features = false, features = [
"time-driver-rtc1",
"gpiote",
], optional = true }
embassy-time = { version = "0.1.0", default-features = false }

[features]
default = [
"nrf52840"
]
default = ["nrf52840"]

nrf52840 = [
"embassy-nrf/nrf52840",
"nrf-softdevice/nrf52840",
"nrf-softdevice/ble-central",
"nrf-softdevice/s140",
"nrf-softdevice-s140",
"embassy-nrf/nrf52840",
"nrf-softdevice/nrf52840",
"nrf-softdevice/ble-central",
"nrf-softdevice/s140",
"nrf-softdevice-s140",
]

nrf52833 = [
"embassy-nrf/nrf52833",
"nrf-softdevice/nrf52833",
"nrf-softdevice/ble-central",
"nrf-softdevice/s140",
"nrf-softdevice-s140",
"embassy-nrf/nrf52833",
"nrf-softdevice/nrf52833",
"nrf-softdevice/ble-central",
"nrf-softdevice/s140",
"nrf-softdevice-s140",
]

defmt = [
"dep:defmt",
"btmesh-driver/defmt",
# "nrf-softdevice/defmt",
"dep:defmt",
"btmesh-driver/defmt",
# "nrf-softdevice/defmt",
]

gatt = [
]
gatt = []

relay = [
"btmesh-common/relay",
"btmesh-driver/relay",
]
proxy = [
"btmesh-common/proxy",
"gatt",
]
friend = [
"btmesh-common/friend"
]
low_power = [
"btmesh-common/low_power"
]
relay = ["btmesh-common/relay", "btmesh-driver/relay"]
proxy = ["btmesh-common/proxy", "gatt"]
friend = ["btmesh-common/friend"]
low_power = ["btmesh-common/low_power"]

[patch.crates-io]
embassy-nrf = { git = "https://github.com/embassy-rs/embassy.git", tag = "embassy-executor-v0.1.1" }
nrf-softdevice = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "e8ee783fdd9674a061c2479d0a29e87e4e2a6d2f" }
nrf-softdevice-s140 = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "e8ee783fdd9674a061c2479d0a29e87e4e2a6d2f" }
nrf-softdevice-macro = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "e8ee783fdd9674a061c2479d0a29e87e4e2a6d2f" }
embassy-nrf = { git = "https://github.com/embassy-rs/embassy.git", rev = "1f2be2dac5eeed739d2866b9b63ca06fdd84c276" }
nrf-softdevice = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "3b3eabb5383ae16a7772924f5301e6a79d0a591f" }
nrf-softdevice-s140 = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "3b3eabb5383ae16a7772924f5301e6a79d0a591f" }
nrf-softdevice-macro = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "3b3eabb5383ae16a7772924f5301e6a79d0a591f" }
55 changes: 36 additions & 19 deletions btmesh-nrf-softdevice/examples/microbit/basic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
authors = [
"Ulf Lilleengen <lulf@redhat.com>",
"Bob McWhirter <bmcwhirt@redhat.com>"
"Ulf Lilleengen <lulf@redhat.com>",
"Bob McWhirter <bmcwhirt@redhat.com>",
]
edition = "2018"
name = "basic"
version = "0.1.0"
description = "microbit Bluetooth Mesh example"
keywords = ["ble", "bluetooth", "mesh", "nrf", "nrf52" ]
keywords = ["ble", "bluetooth", "mesh", "nrf", "nrf52"]
resolver = "2"

[workspace]
Expand All @@ -17,18 +17,35 @@ defmt = { version = "0.3" }
defmt-rtt = { version = "0.3" }
panic-probe = { version = "0.3", features = ["print-defmt"] }

embassy-executor = { version = "0.1.1", default-features = false, features = [ "defmt", "nightly", "integrated-timers" ] }
embassy-time = { version = "0.1.0", default-features = false, features = [ "defmt", "defmt-timestamp-uptime" ] }
embassy-nrf = { version = "0.1.0", default-features = false, features = ["nrf52833", "gpiote", "time-driver-rtc1"]}
embassy-executor = { version = "0.1.1", default-features = false, features = [
"defmt",
"nightly",
"integrated-timers",
] }
embassy-time = { version = "0.1.0", default-features = false, features = [
"defmt",
"defmt-timestamp-uptime",
] }
embassy-nrf = { version = "0.1.0", default-features = false, features = [
"rt",
"nrf52833",
"gpiote",
"time-driver-rtc1",
] }
embassy-futures = { version = "0.1.0", default-features = false }


cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
cortex-m-rt = "0.7"
btmesh-models = { path = "../../../../btmesh-models"}
btmesh-device = { path = "../../../../btmesh-device"}
btmesh-macro = { path = "../../../../btmesh-macro"}
btmesh-nrf-softdevice = { path = "../../../", default-features = false, features = ["defmt", "nrf52833", "proxy", "relay"] }
btmesh-models = { path = "../../../../btmesh-models" }
btmesh-device = { path = "../../../../btmesh-device" }
btmesh-macro = { path = "../../../../btmesh-macro" }
btmesh-nrf-softdevice = { path = "../../../", default-features = false, features = [
"defmt",
"nrf52833",
"proxy",
"relay",
] }

[features]

Expand Down Expand Up @@ -61,18 +78,18 @@ overflow-checks = false
codegen-units = 8
debug = 0
debug-assertions = false
opt-level = 1
opt-level = 1
overflow-checks = false

[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy.git", tag = "embassy-executor-v0.1.1" }
embassy-nrf = { git = "https://github.com/embassy-rs/embassy.git", tag = "embassy-time-v0.1.0" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy.git", tag = "embassy-time-v0.1.0" }
embassy-time = { git = "https://github.com/embassy-rs/embassy.git", tag = "embassy-time-v0.1.0" }
embassy-futures = { git = "https://github.com/embassy-rs/embassy.git", tag = "embassy-time-v0.1.0" }
nrf-softdevice = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "e8ee783fdd9674a061c2479d0a29e87e4e2a6d2f" }
nrf-softdevice-s140 = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "e8ee783fdd9674a061c2479d0a29e87e4e2a6d2f" }
nrf-softdevice-macro = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "e8ee783fdd9674a061c2479d0a29e87e4e2a6d2f" }
embassy-executor = { git = "https://github.com/embassy-rs/embassy.git", rev = "1f2be2dac5eeed739d2866b9b63ca06fdd84c276" }
embassy-nrf = { git = "https://github.com/embassy-rs/embassy.git", rev = "1f2be2dac5eeed739d2866b9b63ca06fdd84c276" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy.git", rev = "1f2be2dac5eeed739d2866b9b63ca06fdd84c276" }
embassy-time = { git = "https://github.com/embassy-rs/embassy.git", rev = "1f2be2dac5eeed739d2866b9b63ca06fdd84c276" }
embassy-futures = { git = "https://github.com/embassy-rs/embassy.git", rev = "1f2be2dac5eeed739d2866b9b63ca06fdd84c276" }
nrf-softdevice = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "3b3eabb5383ae16a7772924f5301e6a79d0a591f" }
nrf-softdevice-s140 = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "3b3eabb5383ae16a7772924f5301e6a79d0a591f" }
nrf-softdevice-macro = { git = "https://github.com/embassy-rs/nrf-softdevice/", rev = "3b3eabb5383ae16a7772924f5301e6a79d0a591f" }

#nrf-softdevice = { path = "../../../../../nrf-softdevice/nrf-softdevice" }
#nrf-softdevice-s140 = { path = "../../../../../nrf-softdevice/nrf-softdevice-s140" }
Expand Down
Loading