#ifndef __IAR_SIGNAL_H__ #define __IAR_SIGNAL_H__
#include <intrinsics.h>
#define sei() __enable_interrupt() #define cli() __disable_interrupt()
#define _PRAGMA_STR(A) _Pragma(#A) #define PRAGMA_STR(A) _PRAGMA_STR(A) #define __VECTOR__(A) vector=A
#define SIGNAL(A) PRAGMA_STR(__VECTOR__(A)) __interrupt void SIGNAL##_##A(void)
#define INTERRUPT(A) PRAGMA_STR(__VECTOR__(A)) __nested __interrupt void SIGNAL##_##A(void)
#define SIGNAL_NAKED(A) PRAGMA_STR(__VECTOR__(A)) __raw __interrupt void SIGNAL##_##A(void)
#define INTERRUPT_NAKED(A) PRAGMA_STR(__VECTOR__(A)) __raw __nested __interrupt void SIGNAL##_##A(void)
#define SIG_INTERRUPT0 INT0_vect #define SIG_INTERRUPT1 INT1_vect #define SIG_OUTPUT_COMPARE2 TIMER2_COMP_vect #define SIG_OVERFLOW2 TIMER2_OVF_vect #define SIG_INPUT_CAPTURE1 TIMER1_CAPT_vect #define SIG_OUTPUT_COMPARE1A TIMER1_COMPA_vect #define SIG_OUTPUT_COMPARE1B TIMER1_COMPB_vect #define SIG_OVERFLOW1 TIMER1_OVF_vect #define SIG_OVERFLOW0 TIMER0_OVF_vect #define SIG_SPI SPI_STC_vect #define SIG_USART_RECV USART_RXC_vect #define SIG_UART_RECV USART_RXC_vect #define SIG_USART_DATA USART_UDRE_vect #define SIG_UART_DATA USART_UDRE_vect #define SIG_USART_TRANS USART_TXC_vect #define SIG_UART_TRANS USART_TXC_vect #define SIG_ADC ADC_vect #define SIG_EEPROM_READY EE_RDY_vect #define SIG_COMPARATOR ANA_COMP_vect #define SIG_2WIRE_SERIAL TWI_vect #define SIG_INTERRUPT2 INT2_vect #define SIG_OUTPUT_COMPARE0 TIMER0_COMP_vect #define SIG_SPM_READY SPM_RDY_vect
#endif
|