Skip to content

Commit

Permalink
Update Cargo dependencies and improve safety checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragarnoy committed Oct 27, 2024
1 parent 3806657 commit 282a0ee
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
strategy:
matrix:
msrv: ["1.77"]
msrv: ["1.80"]
target: [thumbv7em-none-eabihf]
name: ubuntu / ${{ matrix.msrv }}
steps:
Expand Down
45 changes: 32 additions & 13 deletions examples/xe125-nightly/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/xe125-nightly/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ defmt = "0.3"
defmt-rtt = "0.4"

embedded-hal = "1.0.0"
embassy-executor = { version = "0.5.0", features = [ "task-arena-size-20480", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers" ] }
embassy-executor = { version = "0.6.1", features = [ "task-arena-size-20480", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers" ] }
embassy-time = { version = "0.3.0", features = [ "defmt", "tick-hz-32_768" ]}
embassy-stm32 = { version = "0.1.0", features = [ "defmt", "unstable-pac", "stm32l431cb", "memory-x", "time-driver-any", "exti", "chrono"] }
embassy-sync = "0.5"
embassy-embedded-hal = { version = "0.1", features = ["defmt"] }
embedded-hal-bus = { version = "0.1.0", features = ["defmt-03"] }
embassy-sync = "0.6.0"
embassy-embedded-hal = { version = "0.2.0", features = ["defmt"] }
embedded-hal-bus = { version = "0.2.0", features = ["defmt-03"] }

libc = { version = "0.2", default-features = false }
talc = { version = "4.4", default-features = false, features = ["lock_api"] }
Expand Down
6 changes: 5 additions & 1 deletion examples/xe125-nightly/src/bin/distance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ async fn main(_spawner: Spawner) {
);
let exclusive_device = ExclusiveDevice::new(spi, cs_pin, Delay);

unsafe { SPI_DEVICE = Some(RefCell::new(SpiAdapter::new(exclusive_device))) };
unsafe {
SPI_DEVICE = Some(RefCell::new(SpiAdapter::new(
exclusive_device.expect("SPI device init failed!"),
)))
};
let spi_mut_ref = unsafe { SPI_DEVICE.as_mut().unwrap() };

debug!("RSS Version: {}", rss_version());
Expand Down
2 changes: 1 addition & 1 deletion src/processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Drop for Processing {

impl From<acc_processing_result_t> for ProcessingResult {
fn from(result: acc_processing_result_t) -> Self {
let frame = AccComplex::from_ptr(result.frame);
let frame = unsafe { AccComplex::from_ptr(result.frame) };
Self {
inner: result,
frame,
Expand Down

0 comments on commit 282a0ee

Please sign in to comment.