avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] Better Interrupt Macro


From: Dean Camera
Subject: [avr-libc-dev] Better Interrupt Macro
Date: Sun, 26 Nov 2006 10:13:55 +1100

Hi guys,

I've breifly discussed this with Jörg and he thinks it is interesting enough, 
so I'll air it here to see the general consensus.

I've created a new and simple GCC API for the existing interrupt macro, ISR. 
The new API allows for more uniform ISRs, with the SIGNAL, INTERRUPT, NAKED and 
ALIAS facilities avaliable in a uniform manner to the programmer. I believe 
this new set of macros will allow for easier development, as the programmer 
will no longer have to worry about creating their own implementation of the now 
depricated INTERRUPT macro, amognst other things.

The new macro is fully backwards compatible with the present ISR macro. If no 
attributes are defined in the source code, the ISR is assumed to be a normal 
SIGNAL attribute ISR. I have tested the macro with GCC3.4 and GCC4.1, and it 
compiles correctly.

Rather than copy-pasting the code here, I've made a writeup for it at 
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=221655. 
Currently I'm offering it as an "extension" for users to add to their projects, 
but I think it will be of better use if implemented in the AVRLibC source.

What are the thoughts on adding this? If the consensus is to add, I can 
re-format it into the correct AVRLibC style, and add in DoxyGen comments.

Cheers all,
- Dean


reply via email to

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