File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ mod mutex;
88pub use mutex:: * ;
99mod critical_section;
1010pub use self :: critical_section:: * ;
11- #[ cfg( feature = "atomic-device" ) ]
11+ #[ cfg( any ( feature = "atomic-device" , target_has_atomic = "8" ) ) ]
1212mod atomic;
13- #[ cfg( feature = "atomic-device" ) ]
13+ #[ cfg( any ( feature = "atomic-device" , target_has_atomic = "8" ) ) ]
1414pub use atomic:: * ;
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ pub use refcell::*;
1111mod mutex;
1212#[ cfg( feature = "std" ) ]
1313pub use mutex:: * ;
14- #[ cfg( feature = "atomic-device" ) ]
14+ #[ cfg( any ( feature = "atomic-device" , target_has_atomic = "8" ) ) ]
1515mod atomic;
1616mod critical_section;
1717mod shared;
18- #[ cfg( feature = "atomic-device" ) ]
18+ #[ cfg( any ( feature = "atomic-device" , target_has_atomic = "8" ) ) ]
1919pub use atomic:: * ;
2020
2121pub use self :: critical_section:: * ;
Original file line number Diff line number Diff line change 33#[ allow( unused_imports) ]
44use core:: cell:: UnsafeCell ;
55
6- #[ cfg( feature = "atomic-device" ) ]
6+ #[ cfg( any ( feature = "atomic-device" , target_has_atomic = "8" ) ) ]
77/// Cell type used by [`spi::AtomicDevice`](crate::spi::AtomicDevice) and [`i2c::AtomicDevice`](crate::i2c::AtomicDevice).
88///
99/// To use `AtomicDevice`, you must wrap the bus with this struct, and then
@@ -12,12 +12,12 @@ pub struct AtomicCell<BUS> {
1212 pub ( crate ) bus : UnsafeCell < BUS > ,
1313 pub ( crate ) busy : portable_atomic:: AtomicBool ,
1414}
15- #[ cfg( feature = "atomic-device" ) ]
15+ #[ cfg( any ( feature = "atomic-device" , target_has_atomic = "8" ) ) ]
1616unsafe impl < BUS : Send > Send for AtomicCell < BUS > { }
17- #[ cfg( feature = "atomic-device" ) ]
17+ #[ cfg( any ( feature = "atomic-device" , target_has_atomic = "8" ) ) ]
1818unsafe impl < BUS : Send > Sync for AtomicCell < BUS > { }
1919
20- #[ cfg( feature = "atomic-device" ) ]
20+ #[ cfg( any ( feature = "atomic-device" , target_has_atomic = "8" ) ) ]
2121impl < BUS > AtomicCell < BUS > {
2222 /// Create a new `AtomicCell`
2323 pub fn new ( bus : BUS ) -> Self {
You can’t perform that action at this time.
0 commit comments