Skip to content

Commit

Permalink
Merge #9
Browse files Browse the repository at this point in the history
9: Update to critical-section 1.0 r=jonas-schievink a=Dirbaio

This is a breaking change, because 1.0 no longer supplies any critical section implementation by default. The user has to opt-in to one instead (for example, by enabling the `critical-section-single-core` feature in `cortex-m`: rust-embedded/cortex-m#447 (comment)).

TODO before merging:

- [x] Wait for `critical-section 1.0` release rust-embedded/critical-section#19

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
  • Loading branch information
bors[bot] and Dirbaio committed Sep 27, 2022
2 parents d6db4c2 + a82c125 commit 4d988ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ repository = "https://github.com/nrf-rs/nrf-usbd"
cortex-m = "0.7.2"
usb-device = "0.2.8"
vcell = "0.1.3"
critical-section = "0.2.4"
bare-metal = "1.0.0"
critical-section = "1.0.0"

[profile.dev]
codegen-units = 1
Expand Down
3 changes: 1 addition & 2 deletions src/usbd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
//! * Different events are used to initiate transfers.
//! * No notification when the status stage is ACK'd.

use bare_metal::Mutex;
use core::cell::Cell;
use core::mem::MaybeUninit;
use core::sync::atomic::{compiler_fence, Ordering};
use critical_section::CriticalSection;
use critical_section::{CriticalSection, Mutex};
use usb_device::{
bus::{PollResult, UsbBus, UsbBusAllocator},
endpoint::{EndpointAddress, EndpointType},
Expand Down

0 comments on commit 4d988ab

Please sign in to comment.