Skip to content

Commit

Permalink
Merge pull request #115 from ia0/polyfill
Browse files Browse the repository at this point in the history
Support architectures without atomics with polyfill
  • Loading branch information
eldruin authored Apr 25, 2023
2 parents 4ad3f72 + 9c266b9 commit 028abb9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* New enums and allocators for Isochronous endpoints ([#60](https://github.com/rust-embedded-community/usb-device/pull/60)).
* Ability to select USB revision ([#116](https://github.com/rust-embedded-community/usb-device/pull/116)).
* Added support for alternate settings on interfaces ([#114](https://github.com/rust-embedded-community/usb-device/pull/114)).
* Added support for architectures without atomics ([#115](https://github.com/rust-embedded-community/usb-device/pull/115)).

### Changed
* `EndpointType` enum now has fields for isochronous synchronization and usage ([#60](https://github.com/rust-embedded-community/usb-device/pull/60)).
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ repository = "https://github.com/mvirkkunen/usb-device"

[dependencies]
defmt = { version = "0.3", optional = true }
portable-atomic = { version = "1.2.0", default-features = false }

[dev-dependencies]
rusb = "0.9.1"
Expand Down
2 changes: 1 addition & 1 deletion src/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{Result, UsbDirection, UsbError};
use core::cell::RefCell;
use core::mem;
use core::ptr;
use core::sync::atomic::{AtomicPtr, Ordering};
use portable_atomic::{AtomicPtr, Ordering};

/// A trait for device-specific USB peripherals. Implement this to add support for a new hardware
/// platform.
Expand Down
2 changes: 1 addition & 1 deletion src/endpoint.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::bus::UsbBus;
use crate::{Result, UsbDirection};
use core::marker::PhantomData;
use core::sync::atomic::{AtomicPtr, Ordering};
use portable_atomic::{AtomicPtr, Ordering};

/// Trait for endpoint type markers.
pub trait EndpointDirection {
Expand Down

0 comments on commit 028abb9

Please sign in to comment.