fix: broken build with ATmega88A and ATmega168A caused by toolchain
[pub/USBaspLoader.git] / misc / iofixes.h
1 /* Name: iofixes.h
2 * Project: USBaspLoader
3 * Author: Stephan Baerwolf
4 * Creation Date: 2013-12-16
5 * Copyright: (c) 2013 by Stephan Baerwolf
6 * License: GNU GPL v2 (see License.txt)
7 * Version: 0.96.5-testing
8 */
9
10 #ifndef __IOFIXES_H_afa5e75bcfb24ef4a91ed4e7fe26e869
11 #define __IOFIXES_H_afa5e75bcfb24ef4a91ed4e7fe26e869 1
12
13 /*
14 * WARNING: You should not edit this file !
15 *
16 * The purpose of this file is the implementation of
17 * workaround for known bugs in existing AVR toolchains.
18 *
19 * Most of the time it will fix missing definitions
20 * for registers and bitvalues.
21 *
22 */
23
24 #include <avr/io.h>
25
26
27 /* ---------------------- Workarounds AVR IO BUGs ---------------------- */
28 #if defined (__AVR_ATmega88A__)
29
30 /* ATmega88A */
31
32 /* IVCE */
33 # ifndef IVCE
34 # warning IVCE not defined for ATmega88A - fixing
35 # define IVCE 0
36 # endif
37
38 /* IVSEL */
39 # ifndef IVSEL
40 # warning IVSEL not defined for ATmega88A - fixing
41 # define IVSEL 1
42 # endif
43
44 /* RWWSRE */
45 # ifndef RWWSRE
46 # warning RWWSRE not defined for ATmega88A - fixing
47 # define RWWSRE 4
48 # endif
49
50
51
52
53
54
55
56 #elif defined (__AVR_ATmega168A__)
57
58 /* ATmega168A */
59
60 /* IVCE */
61 # ifndef IVCE
62 # warning IVCE not defined for ATmega168A - fixing
63 # define IVCE 0
64 # endif
65
66 /* IVSEL */
67 # ifndef IVSEL
68 # warning IVSEL not defined for ATmega168A - fixing
69 # define IVSEL 1
70 # endif
71
72 /* RWWSRE */
73 # ifndef RWWSRE
74 # warning RWWSRE not defined for ATmega168A - fixing
75 # define RWWSRE 4
76 # endif
77
78 /* RWWSB */
79 # ifndef RWWSB
80 # warning RWWSB not defined for ATmega168A - fixing
81 # define RWWSB 6
82 # endif
83
84
85
86 #endif
87
88
89 #endif