File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ pub mod uart;
78
78
pub mod uarte;
79
79
#[ cfg( not( feature = "9160" ) ) ]
80
80
pub mod uicr;
81
- #[ cfg( not( feature = "9160" ) ) ]
82
81
pub mod wdt;
83
82
84
83
pub mod prelude {
Original file line number Diff line number Diff line change 3
3
//! This HAL implements a basic watchdog timer with 1..=8 handles.
4
4
//! Once the watchdog has been started, it cannot be stopped.
5
5
6
- use crate :: pac:: WDT ;
6
+ use cfg_if:: cfg_if;
7
+
8
+ cfg_if ! {
9
+ if #[ cfg( feature = "9160" ) ] {
10
+ use crate :: pac:: WDT_NS as WDT ;
11
+ } else {
12
+ use crate :: pac:: WDT ;
13
+ }
14
+ }
15
+
16
+
7
17
use handles:: * ;
8
18
9
19
/// A type state representing a watchdog that has not been started.
@@ -202,7 +212,13 @@ where
202
212
/// Is the watchdog active?
203
213
#[ inline( always) ]
204
214
pub fn is_active ( & self ) -> bool {
205
- self . wdt . runstatus . read ( ) . runstatus ( ) . bit_is_set ( )
215
+ cfg_if ! {
216
+ if #[ cfg( feature = "9160" ) ] {
217
+ self . wdt. runstatus. read( ) . runstatuswdt( ) . bit_is_set( )
218
+ } else {
219
+ self . wdt. runstatus. read( ) . runstatus( ) . bit_is_set( )
220
+ }
221
+ }
206
222
}
207
223
}
208
224
You can’t perform that action at this time.
0 commit comments