Skip to content

Commit e4eb680

Browse files
authored
Make ISR(Timer0_OVF_vect) a weak function
In order to let people use Timer0 with all its functions, mark this with the attribute 'weak', so they can redefine this function with their own code.
1 parent 42fa4a1 commit e4eb680

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: cores/arduino/wiring.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ volatile unsigned long timer0_millis = 0;
4040
static unsigned char timer0_fract = 0;
4141

4242
#if defined(TIM0_OVF_vect)
43-
ISR(TIM0_OVF_vect)
43+
ISR(TIM0_OVF_vect, __attribute__((weak))))
4444
#else
45-
ISR(TIMER0_OVF_vect)
45+
ISR(TIMER0_OVF_vect, __attribute__((weak)))
4646
#endif
4747
{
4848
// copy these to local variables so they can be stored in registers

0 commit comments

Comments
 (0)