/[avr-libc]/avr-libc/include/avr/signal.h
ViewVC logotype

Diff of /avr-libc/include/avr/signal.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by joerg_wunsch, Sun Sep 4 18:57:18 2005 UTC revision 1.11 by joerg_wunsch, Fri Nov 4 22:55:15 2005 UTC
# Line 1  Line 1 
1  /* Copyright (c) 2002, Marek Michalkiewicz  /* Copyright (c) 2002,2005 Marek Michalkiewicz
2     All rights reserved.     All rights reserved.
3    
4     Redistribution and use in source and binary forms, with or without     Redistribution and use in source and binary forms, with or without
# Line 33  Line 33 
33  #ifndef _AVR_SIGNAL_H_  #ifndef _AVR_SIGNAL_H_
34  #define _AVR_SIGNAL_H_  #define _AVR_SIGNAL_H_
35    
36  /** \name Macros for writing interrupt handler functions */  #warning "This header file is obsolete.  Use <avr/interrupt.h>."
   
 /*@{*/  
   
 /** \def SIGNAL(signame)  
     \ingroup avr_interrupts  
   
     \code#include <avr/signal.h>\endcode  
   
     Introduces an interrupt handler function that runs with global interrupts  
     initially disabled.  */  
   
 #ifdef __cplusplus  
 #define SIGNAL(signame)                                 \  
 extern "C" void signame(void);                          \  
 void signame (void) __attribute__ ((signal));           \  
 void signame (void)  
 #else  
 #define SIGNAL(signame)                                 \  
 void signame (void) __attribute__ ((signal));           \  
 void signame (void)  
 #endif  
   
 /** \def INTERRUPT(signame)  
     \ingroup avr_interrupts  
   
     \code#include <avr/signal.h>\endcode  
   
     \deprecated  
   
     Introduces an interrupt handler function that runs with global interrupts  
     initially enabled. This allows interrupt handlers to be interrupted.  
   
     As this macro has been used by too many unsuspecting people in the  
     past, it has been deprecated, and will be removed in a future  
     version of the library.  Users who want to legitimately re-enable  
     interrupts in their interrupt handlers as quickly as possible are  
     encouraged to explicitly declare their handlers as described  
     \ref attr_interrupt "above".  
 */  
   
 #ifdef __cplusplus  
 #define INTERRUPT(signame)                              \  
 extern "C" void signame(void);                          \  
 void signame (void) __attribute__ ((interrupt));        \  
 void signame (void)  
 #else  
 #define INTERRUPT(signame)                              \  
 void signame (void) __attribute__ ((interrupt));        \  
 void signame (void)  
 #endif  
   
 /** \def EMPTY_INTERRUPT(signame)  
     \ingroup avr_interrupts  
   
     \code#include <avr/signal.h>\endcode  
   
     Defines an empty interrupt handler function. This will not generate  
     any prolog or epilog code and will only return from the ISR. Do not  
     define a function body as this will define it for you.  
     Example:  
     \code EMPTY_INTERRUPT(SIG_ADC);\endcode */  
   
 #ifdef __cplusplus  
 #define EMPTY_INTERRUPT(signame)                \  
 extern "C" void signame(void);                  \  
 void signame (void) __attribute__ ((naked));    \  
 void signame (void) {  __asm__ __volatile__ ("reti" ::); }  
 #else  
 #define EMPTY_INTERRUPT(signame)                \  
 void signame (void) __attribute__ ((naked));    \  
 void signame (void) { __asm__ __volatile__ ("reti" ::); }  
 #endif  
   
   
   
 /*@}*/  
37    
38  #endif /* _AVR_SIGNAL_H_ */  #endif /* _AVR_SIGNAL_H_ */

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26