aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-30 09:17:46 -0700
committerSelene ToyKeeper2023-11-30 09:17:46 -0700
commit3fde090a8e55163288148b37e172b11cdeb3cc50 (patch)
tree0e7f6c2c5f362719ac4efad9d5c2365f3ed3c159
parentmade the avr32dd20 flashing script more universal (diff)
downloadanduril-3fde090a8e55163288148b37e172b11cdeb3cc50.tar.gz
anduril-3fde090a8e55163288148b37e172b11cdeb3cc50.tar.bz2
anduril-3fde090a8e55163288148b37e172b11cdeb3cc50.zip
eliminated direct CCP register access from arch/attiny1616
(the protected write macro exists for a reason, and should be used instead)
Diffstat (limited to '')
-rw-r--r--arch/attiny1616.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/attiny1616.c b/arch/attiny1616.c
index 2770d06..c5499dd 100644
--- a/arch/attiny1616.c
+++ b/arch/attiny1616.c
@@ -210,8 +210,8 @@ inline void mcu_pcint_off() {
void reboot() {
// put the WDT in hard reset mode, then trigger it
cli();
- CCP = CCP_IOREG_gc; // temporarily disable change protection
- WDT.CTRLA = WDT_PERIOD_8CLK_gc; // Enable, timeout 8ms
+ // Enable, timeout 8ms
+ _PROTECTED_WRITE(WDT.CTRLA, WDT_PERIOD_8CLK_gc);
sei();
wdt_reset();
while (1) {}