File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-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
+ }
12
+ else {
13
+ use crate :: pac:: WDT ;
14
+ }
15
+ }
16
+
17
+
7
18
use handles:: * ;
8
19
9
20
/// A type state representing a watchdog that has not been started.
@@ -202,7 +213,14 @@ where
202
213
/// Is the watchdog active?
203
214
#[ inline( always) ]
204
215
pub fn is_active ( & self ) -> bool {
205
- self . wdt . runstatus . read ( ) . runstatus ( ) . bit_is_set ( )
216
+ cfg_if ! {
217
+ if #[ cfg( feature = "9160" ) ]
218
+ {
219
+ self . wdt. runstatus. read( ) . runstatuswdt( ) . bit_is_set( )
220
+ } else {
221
+ self . wdt. runstatus. read( ) . runstatus( ) . bit_is_set( )
222
+ }
223
+ }
206
224
}
207
225
}
208
226
You can’t perform that action at this time.
0 commit comments