Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1033 | - | 1 | #ifndef CHIPDEF_H |
2 | #define CHIPDEF_H |
||
3 | |||
4 | #include <avr/io.h> |
||
5 | |||
6 | |||
7 | |||
8 | |||
9 | #if defined (SPMCSR) |
||
10 | #define SPM_REG SPMCSR |
||
11 | #elif defined (SPMCR) |
||
12 | #define SPM_REG SPMCR |
||
13 | #else |
||
14 | #error "AVR processor does not provide bootloader support!" |
||
15 | #endif |
||
16 | |||
17 | #define APP_END (FLASHEND - (BOOTSIZE * 2)) |
||
18 | |||
19 | #if (SPM_PAGESIZE > UINT8_MAX) |
||
20 | typedef uint16_t pagebuf_t; |
||
21 | #else |
||
22 | typedef uint8_t pagebuf_t; |
||
23 | #endif |
||
24 | |||
25 | #if defined(__AVR_ATmega169__) |
||
26 | #include "mega169.h" |
||
27 | |||
28 | #elif defined(__AVR_ATmega16__) |
||
29 | #include "mega16.h" |
||
30 | |||
31 | #elif defined(__AVR_ATmega162__) |
||
32 | #include "mega162.h" |
||
33 | |||
34 | #elif defined(__AVR_ATmega8__) |
||
35 | #include "mega8.h" |
||
36 | |||
37 | #elif defined(__AVR_ATmega32__) |
||
38 | #include "mega32.h" |
||
39 | |||
40 | #elif defined(__AVR_ATmega324P__) |
||
41 | #include "mega324p.h" |
||
42 | |||
43 | #elif defined(__AVR_ATmega64__) |
||
44 | #include "mega64.h" |
||
45 | |||
46 | #elif defined(__AVR_ATmega644__) |
||
47 | #include "mega644.h" |
||
48 | |||
49 | #elif defined(__AVR_ATmega644P__) |
||
50 | #include "mega644p.h" |
||
51 | |||
52 | #elif defined(__AVR_ATmega128__) |
||
53 | #include "mega128.h" |
||
54 | |||
55 | #elif defined(__AVR_AT90CAN128__) |
||
56 | #include "mega128can.h" |
||
57 | |||
58 | #else |
||
59 | #error "no definition for MCU available in chipdef.h" |
||
60 | #endif |
||
61 | |||
62 | #endif |