File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ rust-version = "1.59"
13
13
[dependencies ]
14
14
embedded-hal = { version = " 0.2.6" , features = [" unproven" ] }
15
15
nb = " 1.0.0"
16
- atomic-polyfill = " 1.0.2"
17
16
riscv = { version = " 0.10.1" , features = [" critical-section-single-hart" ] }
18
17
e310x = { version = " 0.11.0" , features = [" rt" , " critical-section" ] }
19
18
19
+ [target .'cfg(not(target_has_atomic = "32"))' .dependencies ]
20
+ portable-atomic = { version = " 1.4" , default-features = false , features = [" unsafe-assume-single-core" ] }
21
+
20
22
[features ]
21
23
g002 = [" e310x/g002" ]
22
24
virq = []
Original file line number Diff line number Diff line change 1
1
//! General Purpose I/O
2
2
3
- use atomic_polyfill:: { AtomicU32 , Ordering } ;
4
3
use core:: marker:: PhantomData ;
5
4
5
+ #[ cfg( target_has_atomic = "32" ) ]
6
+ use core:: sync:: atomic:: { AtomicU32 , Ordering } ;
7
+ #[ cfg( not( target_has_atomic = "32" ) ) ]
8
+ use portable_atomic:: { AtomicU32 , Ordering } ;
9
+
6
10
/// GpioExt trait extends the GPIO0 peripheral.
7
11
pub trait GpioExt {
8
12
/// The parts to split the GPIO into.
You can’t perform that action at this time.
0 commit comments