Change AVRISP project's timeout to be interrupt based again, but make the interrupt...
[pub/lufa.git] / Projects / AVRISP-MKII / Lib / Timeout.S
1 #include <avr/io.h>
2 #include "V2Protocol.h"
3
4 .global TIMER0_COMPA_vect
5 TIMER0_COMPA_vect:
6 sei
7 push r24
8 in r24, 0x3f
9 push r24
10
11 in r24, TimeoutMSRemaining
12 and r24, r24
13 breq Epilogue
14 subi r24, 0x01
15 out TimeoutMSRemaining, r24
16
17 Epilogue:
18 pop r24
19 out 0x3f, r24
20 pop r24
21 reti
22
23