avr: minor changes to watchdogOn (not used, yet).
This commit is contained in:
@@ -17,8 +17,11 @@
|
||||
|
||||
|
||||
watchdogOn:
|
||||
in r16, WDTCSR
|
||||
ori r16, (1<<WDE) | (1<<WDP0) ; about 32ms period
|
||||
ldi r16, (1<<WDE) | (1<<WDP0) ; about 32ms period
|
||||
out WDTCSR, r16
|
||||
ldi r16, (1<<WDP0) ; about 32ms period
|
||||
out WDTCSR, r16
|
||||
ori r16, (1<<WDE)
|
||||
out WDTCSR, r16
|
||||
ret
|
||||
|
||||
@@ -26,6 +29,9 @@ watchdogOn:
|
||||
|
||||
watchdogOff:
|
||||
wdr ; reset WDT
|
||||
ldi r16, (0<<WDRF) ; clear WDRF bit in MCUSR
|
||||
out MCUSR, r16
|
||||
|
||||
in r16, WDTCSR
|
||||
ori r16, (1<<WDCE)|(1<<WDE)
|
||||
push r15
|
||||
|
||||
Reference in New Issue
Block a user