Skip to content

Commit

Permalink
Merge pull request #272 from alexmoon/update-deps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
alexmoon authored Aug 11, 2024
2 parents 9973f61 + 4dc9eba commit 7699fcb
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 49 deletions.
6 changes: 3 additions & 3 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ nrf52832-dk = ["nrf52832"]
microbit-v2 = ["nrf52833"]

[dependencies]
embassy-executor = { version = "0.5.0", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"]}
embassy-executor = { version = "0.6.0", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"]}
embassy-time = { version = "0.3.0", features = ["defmt", "defmt-timestamp-uptime"]}
embassy-sync = { version = "0.5.0" }
embassy-nrf = { version = "0.1.0", features = ["defmt", "gpiote", "time-driver-rtc1" ]}
embassy-sync = { version = "0.6.0" }
embassy-nrf = { version = "0.2.0", features = ["defmt", "gpiote", "time-driver-rtc1" ]}
cortex-m = "0.7.7"
cortex-m-rt = "0.7.3"
defmt = "0.3.5"
Expand Down
8 changes: 0 additions & 8 deletions examples/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ fn linker_data() -> &'static [u8] {
return include_bytes!("memory-nrf52833.x");
#[cfg(feature = "nrf52840")]
return include_bytes!("memory-nrf52840.x");

#[cfg(any(
feature = "nrf52805",
feature = "nrf52810",
feature = "nrf52811",
feature = "nrf52820",
))]
panic!("Unable to build examples for currently selected chip due to missing chip-specific linker configuration (memory.x)")
}

fn main() {
Expand Down
1 change: 0 additions & 1 deletion nrf-softdevice-macro/src/security_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use proc_macro2::TokenStream;
use quote::{quote, ToTokens};

#[derive(Debug, PartialEq, Eq, Clone, Copy)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum SecurityMode {
NoAccess,
Open,
Expand Down
2 changes: 1 addition & 1 deletion nrf-softdevice/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ log = { version = "0.4.11", optional = true }
critical-section = { version = "1.0", optional = true }

num_enum = { version = "0.7.0", default-features = false }
embassy-sync = { version = "0.5.0" }
embassy-sync = { version = "0.6.0" }
embassy-futures = { version = "0.1.1" }
cortex-m = "0.7.2"
cortex-m-rt = ">=0.6.15,<0.8"
Expand Down
4 changes: 2 additions & 2 deletions nrf-softdevice/src/ble/central.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ where
len: BUF_LEN as u16,
};

let ret = unsafe { raw::sd_ble_gap_scan_start(&scan_params, &BUF_DATA) };
let ret = unsafe { raw::sd_ble_gap_scan_start(&scan_params, ptr::addr_of!(BUF_DATA)) };
match RawError::convert(ret) {
Ok(()) => {}
Err(err) => {
Expand Down Expand Up @@ -218,7 +218,7 @@ where
}

// Resume scan
let ret = raw::sd_ble_gap_scan_start(ptr::null(), &BUF_DATA);
let ret = raw::sd_ble_gap_scan_start(ptr::null(), ptr::addr_of!(BUF_DATA));
match RawError::convert(ret) {
Ok(()) => {}

Expand Down
29 changes: 0 additions & 29 deletions nrf-softdevice/src/ble/gatt_server/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ use core::marker::PhantomData;
use core::mem;
use core::ptr::null;

#[cfg(feature = "alloc")]
extern crate alloc;

#[cfg(feature = "alloc")]
use alloc::boxed::Box;

use super::characteristic::{self, AttributeMetadata, Presentation};
use super::{CharacteristicHandles, DescriptorHandle, IncludedServiceHandle, RegisterError, ServiceHandle};
use crate::ble::Uuid;
Expand Down Expand Up @@ -54,18 +48,6 @@ impl<'a> ServiceBuilder<'a> {
self.add_characteristic_inner(uuid, value, attr.max_len, &attr_md, md)
}

#[cfg(feature = "alloc")]
pub fn add_characteristic_app(
&mut self,
uuid: Uuid,
attr: characteristic::Attribute<Box<[u8]>>,
md: characteristic::Metadata,
) -> Result<CharacteristicBuilder<'_>, RegisterError> {
let value = Box::leak(attr.value);
let attr_md = attr.metadata.into_raw_user();
self.add_characteristic_inner(uuid, value, attr.max_len, &attr_md, md)
}

fn add_characteristic_inner(
&mut self,
uuid: Uuid,
Expand Down Expand Up @@ -152,17 +134,6 @@ impl<'a> CharacteristicBuilder<'a> {
self.add_descriptor_inner(uuid, value, attr.max_len, &attr_md)
}

#[cfg(feature = "alloc")]
pub fn add_descriptor_app(
&mut self,
uuid: Uuid,
attr: characteristic::Attribute<Box<[u8]>>,
) -> Result<DescriptorHandle, RegisterError> {
let value = Box::leak(attr.value);
let attr_md = attr.metadata.into_raw_user();
self.add_descriptor_inner(uuid, value, attr.max_len, &attr_md)
}

fn add_descriptor_inner(
&mut self,
uuid: Uuid,
Expand Down
5 changes: 0 additions & 5 deletions nrf-softdevice/src/ble/gatt_server/characteristic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ impl AttributeMetadata {
self.into_raw_inner(raw::BLE_GATTS_VLOC_STACK as u8)
}

#[cfg(feature = "alloc")]
pub(crate) fn into_raw_user(self) -> raw::ble_gatts_attr_md_t {
self.into_raw_inner(raw::BLE_GATTS_VLOC_USER as u8)
}

fn into_raw_inner(self, vloc: u8) -> raw::ble_gatts_attr_md_t {
raw::ble_gatts_attr_md_t {
read_perm: self.read.into_raw(),
Expand Down
1 change: 1 addition & 0 deletions nrf-softdevice/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ pub struct NoneError;
pub trait Try {
type Ok;
type Error;
#[allow(dead_code)]
fn into_result(self) -> Result<Self::Ok, Self::Error>;
}

Expand Down

0 comments on commit 7699fcb

Please sign in to comment.