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