Skip to content

Commit 020da8c

Browse files
Bump version for SAMD fix, appease clang-format
1 parent b95520f commit 020da8c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit SleepyDog Library
2-
version=1.6.0
2+
version=1.6.1
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
55
sentence=Arduino library to use the watchdog timer for system reset and low power sleep.

utility/WatchdogSAMD.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,19 +209,20 @@ int WatchdogSAMD::sleep(int maxPeriodMS) {
209209
; // Wait for it to take
210210
#else
211211
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
212-
// Due to a hardware bug on the SAMD21, the SysTick interrupts become
212+
// Due to a hardware bug on the SAMD21, the SysTick interrupts become
213213
// active before the flash has powered up from sleep, causing a hard fault.
214-
// To prevent this the SysTick interrupts are disabled before entering sleep mode.
215-
SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk; // Disable SysTick interrupts
214+
// To prevent this the SysTick interrupts are disabled before entering sleep
215+
// mode.
216+
SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk; // Disable SysTick interrupts
216217
#endif
217218

218219
__DSB(); // Data sync to ensure outgoing memory accesses complete
219220
__WFI(); // Wait for interrupt (places device in sleep mode)
220221

221222
#if (SAMD20_SERIES || SAMD21_SERIES)
222-
SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk; // Enable SysTick interrupts
223+
SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk; // Enable SysTick interrupts
223224
#endif
224-
225+
225226
// Code resumes here on wake (WDT early warning interrupt).
226227
// Bug: the return value assumes the WDT has run its course;
227228
// incorrect if the device woke due to an external interrupt.

0 commit comments

Comments
 (0)