Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1025 | - | 1 | #ifndef _MEGA162_H_ |
2 | #define _MEGA162_H_ |
||
3 | |||
4 | /* Part-Code ISP */ |
||
5 | // documented code (AVR109 AppNote) but not supported by AVRProg 1.40 |
||
6 | // #define DEVTYPE_ISP 0x62 |
||
7 | // fake ATmega16 instead: |
||
8 | #define DEVTYPE_ISP 0x74 |
||
9 | /* Part-Code Boot */ |
||
10 | // documented code but not supported by AVRProg 1.40 |
||
11 | // #define DEVTYPE_BOOT 0x63 |
||
12 | // fake ATmega16: |
||
13 | #define DEVTYPE_BOOT 0x75 |
||
14 | |||
15 | #define SIG_BYTE1 0x1E |
||
16 | #define SIG_BYTE2 0x94 |
||
17 | #define SIG_BYTE3 0x04 |
||
18 | |||
19 | #ifndef UART_USE_SECOND |
||
20 | #define UART_BAUD_HIGH UBRR0H |
||
21 | #define UART_BAUD_LOW UBRR0L |
||
22 | #define UART_STATUS UCSR0A |
||
23 | #define UART_TXREADY UDRE0 |
||
24 | #define UART_RXREADY RXC0 |
||
25 | #define UART_DOUBLE U2X0 |
||
26 | #define UART_CTRL UCSR0B |
||
27 | #define UART_CTRL_DATA ((1<<TXEN0) | (1<<RXEN0)) |
||
28 | #define UART_CTRL2 UCSR0C |
||
29 | #define UART_CTRL2_DATA ((1<<URSEL0) | (1<<UCSZ01) | (1<<UCSZ00)) |
||
30 | #define UART_DATA UDR0 |
||
31 | #else |
||
32 | #define UART_BAUD_HIGH UBRR1H |
||
33 | #define UART_BAUD_LOW UBRR1L |
||
34 | #define UART_STATUS UCSR1A |
||
35 | #define UART_TXREADY UDRE1 |
||
36 | #define UART_RXREADY RXC1 |
||
37 | #define UART_DOUBLE U2X1 |
||
38 | #define UART_CTRL UCSR1B |
||
39 | #define UART_CTRL_DATA ((1<<TXEN1) | (1<<RXEN1)) |
||
40 | #define UART_CTRL2 UCSR1C |
||
41 | #define UART_CTRL2_DATA ( (1<<URSEL1) | (1<<UCSZ11) | (1<<UCSZ10)) |
||
42 | #define UART_DATA UDR1 |
||
43 | #endif |
||
44 | |||
45 | #endif // #ifndef _MEGA162_H_ |