avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] RE: Class Interrupts


From: Ron Kreymborg
Subject: RE: [avr-gcc-list] RE: Class Interrupts
Date: Tue, 25 Mar 2008 07:27:52 +1100

> The idea was not mine - based on msp430-gcc where the "interrupt"
> function attribute expects the vector number as argument.
> 
> Hope this helps,
> Marek

Therefore as a specification then: The intent of this patch is so an
interrupt function for, say, a mega8 timer0 overflow can be declared as:

ISR(TIMER2_OVF_vect) {


Or even as:

void __vector_9 (void)
     __attribute__ ((signal,used,externally_visible));
void __vector_9 (void) {


Or most importantly as:

void MyTimer0OvfInt(void)
      __attribute__((signal,10,used,externally_visible));
void MyTimer0OvfInt(void) {

Where the number in the last case is, of course, taken directly from the
Atmel vector table in the specification for the respective processor and
adjusted as necessary by the compiler.

Have I got the number declaration right?

Ron






reply via email to

[Prev in Thread] Current Thread [Next in Thread]