Skip to content

Commit 1b504bf

Browse files
Merge #376
376: nrf9160 enable gpiote r=jonas-schievink a=folkertdev Title says it all cc `@diondokter` Co-authored-by: Folkert <[email protected]>
2 parents 577a9f3 + ca7786a commit 1b504bf

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

nrf-hal-common/src/gpiote.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,32 @@
66
#[cfg(feature = "51")]
77
use crate::pac::GPIO as P0;
88

9-
#[cfg(not(feature = "51"))]
9+
#[cfg(feature = "9160")]
10+
use crate::pac::P0_NS as P0;
11+
12+
#[cfg(not(any(feature = "51", feature = "9160")))]
1013
use crate::pac::P0;
1114

1215
#[cfg(any(feature = "52833", feature = "52840"))]
1316
use crate::pac::P1;
1417

18+
use crate::gpio::{
19+
Floating, Input, Level, OpenDrain, Output, Pin, Port, PullDown, PullUp, PushPull,
20+
};
21+
22+
#[cfg(not(feature = "9160"))]
1523
use {
16-
crate::gpio::{
17-
Floating, Input, Level, OpenDrain, Output, Pin, Port, PullDown, PullUp, PushPull,
18-
},
1924
crate::pac::gpiote::{EVENTS_IN, EVENTS_PORT, TASKS_OUT},
2025
crate::pac::GPIOTE,
2126
};
2227

23-
#[cfg(not(feature = "51"))]
28+
#[cfg(feature = "9160")]
29+
use {
30+
crate::pac::gpiote0_s::{EVENTS_IN, EVENTS_PORT, TASKS_CLR, TASKS_OUT, TASKS_SET},
31+
crate::pac::GPIOTE1_NS as GPIOTE,
32+
};
33+
34+
#[cfg(not(any(feature = "51", feature = "9160")))]
2435
use crate::pac::gpiote::{TASKS_CLR, TASKS_SET};
2536

2637
#[cfg(not(feature = "51"))]

nrf-hal-common/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub mod delay;
4242
#[cfg(not(any(feature = "9160", feature = "5340-app")))]
4343
pub mod ecb;
4444
pub mod gpio;
45-
#[cfg(not(any(feature = "9160", feature = "5340-app")))]
45+
#[cfg(not(feature = "5340-app"))]
4646
pub mod gpiote;
4747
#[cfg(not(any(feature = "51", feature = "52810", feature = "52811")))]
4848
pub mod i2s;

0 commit comments

Comments
 (0)