#define SIGNAL __attribute__ ((signal)) /* Reset Vector */ #define RESET __vector_0 /* Interrupt Vector */ #define EXT_INT0 __vector_1 #define EXT_INT1 __vector_2 #define TIM1_CAPT __vector_3 #define TIM1_COMPA __vector_4 #define TIM1_COMPB __vector_5 #define TIM1_OVF __vector_6 #define TIM0_OVF __vector_7 #define SPI_STC __vector_8 #define UART_RXC __vector_9 #define UART_DRE __vector_10 #define UART_TXC __vector_11 #define ANA_COMP __vector_12 /* I/O Registers Base */ #define IO_BASE 0x20 /* Timer/Counter0 Control Register */ #define TCCR0 *((volatile unsigned char *) (IO_BASE + 0x33)) /* Timer/Counter1 Control Register B */ #define TCCR1B *((volatile unsigned char *) (IO_BASE + 0x2E)) /* PORTB, Data Register, Port B */ #define PORTB *((volatile unsigned char *) (IO_BASE + 0x18)) /* Data Direction Register, Port B */ #define DDRB *((volatile unsigned char *) (IO_BASE + 0x17)) /* PORTD, Data Register, Port D */ #define PORTD *((volatile unsigned char *) (IO_BASE + 0x12)) /* DDRD, Data Direction Register, Port D */ #define DDRD *((volatile unsigned char *) (IO_BASE + 0x11)) /* PIND, Input Pins, Port D */ #define PIND *((volatile unsigned char *) (IO_BASE + 0x10)) /* GIMSK, General Interrupt Mask Register */ #define GIMSK *((volatile unsigned char *) (IO_BASE + 0x3B)) /* SREG, Status Register */ #define SREG *((volatile unsigned char *) (IO_BASE + 0x3F)) /* Time/Counter Interrupt Mask Register */ #define TIMSK *((volatile unsigned char *) (IO_BASE + 0x39)) /* MCU Control Register */ #define MCUCR *((volatile unsigned char *) (IO_BASE + 0x35))