File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 4
4
#![ no_std]
5
5
6
6
//#[macro_use]
7
- // mod utils;
8
- use stm32g4xx_hal:: { independent_watchdog:: IndependentWatchdog , prelude :: * , stm32 :: Peripherals } ;
7
+ mod utils;
8
+ use stm32g4xx_hal:: { independent_watchdog:: IndependentWatchdog , stm32 :: Peripherals , time :: ExtU32 } ;
9
9
10
10
use cortex_m_rt:: entry;
11
-
12
- // TODO: Use utils instead
13
- use defmt:: Logger ;
14
- use defmt_rtt as _; // global logger
15
- use panic_probe as _;
16
-
17
- use defmt:: info; // TODO: Use utils::logger instead
11
+ use utils:: logger:: info;
18
12
19
13
#[ entry]
20
14
fn main ( ) -> ! {
@@ -33,7 +27,7 @@ fn main() -> ! {
33
27
34
28
// Enable the watchdog with a limit of 32.76 seconds (which is the maximum this watchdog can do) and wait forever
35
29
// -> restart the chip
36
- watchdog. start ( 32_760 . ms ( ) ) ;
30
+ watchdog. start ( 32_760 . millis ( ) ) ;
37
31
38
32
// Alternatively, there's also a windowed option where if the watchdog is fed before the window time, it will reset the chip as well
39
33
// watchdog.start_windowed(100.millis(), 200.millis());
You can’t perform that action at this time.
0 commit comments