Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1024 | - | 1 | #ifndef _MEGA128CAN_H_ |
2 | #define _MEGA128CAN_H_ |
||
3 | |||
4 | /* Dummy: use ATmega128 device-code for now, |
||
5 | must be same as used in avrdude.conf */ |
||
6 | /* Part-Code ISP */ |
||
7 | #define DEVTYPE_ISP 0x43 |
||
8 | /* Part-Code Boot */ |
||
9 | #define DEVTYPE_BOOT 0x44 |
||
10 | |||
11 | #define SIG_BYTE1 0x1E |
||
12 | #define SIG_BYTE2 0x97 |
||
13 | #define SIG_BYTE3 0x81 |
||
14 | |||
15 | |||
16 | #ifndef UART_USE_SECOND |
||
17 | #define UART_BAUD_HIGH UBRR0H |
||
18 | #define UART_BAUD_LOW UBRR0L |
||
19 | #define UART_STATUS UCSR0A |
||
20 | #define UART_TXREADY UDRE0 |
||
21 | #define UART_RXREADY RXC0 |
||
22 | #define UART_DOUBLE U2X0 |
||
23 | #define UART_CTRL UCSR0B |
||
24 | #define UART_CTRL_DATA ((1<<TXEN0) | (1<<RXEN0)) |
||
25 | #define UART_CTRL2 UCSR0C |
||
26 | #define UART_CTRL2_DATA ((1<<UCSZ01) | (1<<UCSZ00)) |
||
27 | #define UART_DATA UDR0 |
||
28 | #else |
||
29 | #define UART_BAUD_HIGH UBRR1H |
||
30 | #define UART_BAUD_LOW UBRR1L |
||
31 | #define UART_STATUS UCSR1A |
||
32 | #define UART_TXREADY UDRE1 |
||
33 | #define UART_RXREADY RXC1 |
||
34 | #define UART_DOUBLE U2X1 |
||
35 | #define UART_CTRL UCSR1B |
||
36 | #define UART_CTRL_DATA ((1<<TXEN1) | (1<<RXEN1)) |
||
37 | #define UART_CTRL2 UCSR1C |
||
38 | #define UART_CTRL2_DATA ((1<<UCSZ11) | (1<<UCSZ10)) |
||
39 | #define UART_DATA UDR1 |
||
40 | #endif |
||
41 | |||
42 | #endif // #ifndef _MEGA128CAN_H_ |