]>
git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/common/io.h
1 /* vim:ts=4 sts=4 et tw=80
5 * for additional information please
6 * see http://lochraster.org/fnordlichtmini
8 * (c) by Alexander Neumann <alexander@bumpern.de>
9 * Lars Noschinski <lars@public.noschinski.de>
11 * This program is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License version 3 as published by
13 * the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20 * You should have received a copy of the GNU General Public License along with
21 * this program. If not, see <http://www.gnu.org/licenses/>.
29 /* cpu specific configuration registers */
30 #if defined(__AVR_ATmega8__)
32 #define _TIMSK_TIMER1 TIMSK
33 #define _TIFR_TIMER1 TIFR
34 #define _UCSRB_UART0 UCSRB
35 #define _UCSRA_UART0 UCSRA
36 #define _UDRIE_UART0 UDRIE
37 #define _UDRE_UART0 UDRE
38 #define _RXC_UART0 RXC
39 #define _TXC_UART0 TXC
40 #define _TXEN_UART0 TXEN
41 #define _RXEN_UART0 RXEN
42 #define _RXCIE_UART0 RXCIE
43 #define _UBRRH_UART0 UBRRH
44 #define _UBRRL_UART0 UBRRL
45 #define _UCSRC_UART0 UCSRC
46 #define _UCSZ0_UART0 UCSZ0
47 #define _UCSZ1_UART0 UCSZ1
48 #define _U2X_UART0 U2X
49 #define _SIG_UART_RECV_UART0 SIG_UART_RECV
50 #define _SIG_UART_DATA_UART0 SIG_UART_DATA
51 #define _UDR_UART0 UDR
70 #define _IFR_INT0 GIFR
71 #define _ICR_INT0 GICR
73 #elif defined(__AVR_ATmega88__) || defined(__AVR_ATmega168__)
75 #define _TIMSK_TIMER1 TIMSK1
76 #define _TIFR_TIMER1 TIFR1
77 #define _UCSRA_UART0 UCSR0A
78 #define _UCSRB_UART0 UCSR0B
79 #define _UDRIE_UART0 UDRIE0
80 #define _UDRE_UART0 UDRE0
81 #define _RXC_UART0 RXC0
82 #define _TXC_UART0 TXC0
83 #define _TXEN_UART0 TXEN0
84 #define _RXEN_UART0 RXEN0
85 #define _RXCIE_UART0 RXCIE0
86 #define _UBRRH_UART0 UBRR0H
87 #define _UBRRL_UART0 UBRR0L
88 #define _UCSRC_UART0 UCSR0C
89 #define _UCSZ0_UART0 UCSZ00
90 #define _UCSZ1_UART0 UCSZ01
91 #define _U2X_UART0 U2X0
92 #define _SIG_UART_RECV_UART0 SIG_USART_RECV
93 #define _SIG_UART_DATA_UART0 SIG_USART_DATA
94 #define _UDR_UART0 UDR0
96 #define _IFR_INT0 EIFR
97 #define _ICR_INT0 EIMSK