control servo 0 with axis 0
[protos/xbee-avr.git] / aversive / parts / ATtiny12.h
1 /*  
2  *  Copyright Droids Corporation, Microb Technology, Eirbot (2009)
3  * 
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  *  Revision : $Id $
19  *
20  */
21
22 /* WARNING : this file is automatically generated by scripts.
23  * You should not edit it. If you find something wrong in it,
24  * write to zer0@droids-corp.org */
25
26
27 /* prescalers timer 0 */
28 #define TIMER0_PRESCALER_DIV_0          0
29 #define TIMER0_PRESCALER_DIV_1          1
30 #define TIMER0_PRESCALER_DIV_8          2
31 #define TIMER0_PRESCALER_DIV_64         3
32 #define TIMER0_PRESCALER_DIV_256        4
33 #define TIMER0_PRESCALER_DIV_1024       5
34 #define TIMER0_PRESCALER_DIV_FALL       6
35 #define TIMER0_PRESCALER_DIV_RISE       7
36
37 #define TIMER0_PRESCALER_REG_0          0
38 #define TIMER0_PRESCALER_REG_1          1
39 #define TIMER0_PRESCALER_REG_2          8
40 #define TIMER0_PRESCALER_REG_3          64
41 #define TIMER0_PRESCALER_REG_4          256
42 #define TIMER0_PRESCALER_REG_5          1024
43 #define TIMER0_PRESCALER_REG_6          -1
44 #define TIMER0_PRESCALER_REG_7          -2
45
46
47 /* available timers */
48 #define TIMER0_AVAILABLE
49
50 /* overflow interrupt number */
51 #define SIG_OVERFLOW0_NUM 0
52 #define SIG_OVERFLOW_TOTAL_NUM 1
53
54 /* output compare interrupt number */
55 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 0
56
57 /* Pwm nums */
58 #define PWM_TOTAL_NUM 0
59
60 /* input capture interrupt number */
61 #define SIG_INPUT_CAPTURE_TOTAL_NUM 0
62
63
64 /* GIFR */
65 #define PCIF_REG             GIFR
66 #define INTF0_REG            GIFR
67
68 /* TIMSK */
69 #define TOIE0_REG            TIMSK
70
71 /* WDTCR */
72 #define WDP0_REG             WDTCR
73 #define WDP1_REG             WDTCR
74 #define WDP2_REG             WDTCR
75 #define WDE_REG              WDTCR
76 #define WDTOE_REG            WDTCR
77
78 /* GIMSK */
79 #define PCIE_REG             GIMSK
80 #define INT0_REG             GIMSK
81
82 /* OSCCAL */
83 #define CAL0_REG             OSCCAL
84 #define CAL1_REG             OSCCAL
85 #define CAL2_REG             OSCCAL
86 #define CAL3_REG             OSCCAL
87 #define CAL4_REG             OSCCAL
88 #define CAL5_REG             OSCCAL
89 #define CAL6_REG             OSCCAL
90 #define CAL7_REG             OSCCAL
91
92 /* PINB */
93 #define PINB0_REG            PINB
94 #define PINB1_REG            PINB
95 #define PINB2_REG            PINB
96 #define PINB3_REG            PINB
97 #define PINB4_REG            PINB
98 #define PINB5_REG            PINB
99
100 /* EEAR */
101 #define EEAR0_REG            EEAR
102 #define EEAR1_REG            EEAR
103 #define EEAR2_REG            EEAR
104 #define EEAR3_REG            EEAR
105 #define EEAR4_REG            EEAR
106 #define EEAR5_REG            EEAR
107
108 /* PORTB */
109 #define PORTB0_REG           PORTB
110 #define PORTB1_REG           PORTB
111 #define PORTB2_REG           PORTB
112 #define PORTB3_REG           PORTB
113 #define PORTB4_REG           PORTB
114
115 /* TCCR0 */
116 #define CS00_REG             TCCR0
117 #define CS01_REG             TCCR0
118 #define CS02_REG             TCCR0
119
120 /* EECR */
121 #define EERE_REG             EECR
122 #define EEWE_REG             EECR
123 #define EEMWE_REG            EECR
124 #define EERIE_REG            EECR
125
126 /* MCUCR */
127 #define ISC00_REG            MCUCR
128 #define ISC01_REG            MCUCR
129 #define SM_REG               MCUCR
130 #define SE_REG               MCUCR
131 #define PUD_REG              MCUCR
132
133 /* DDRB */
134 #define DDB0_REG             DDRB
135 #define DDB1_REG             DDRB
136 #define DDB2_REG             DDRB
137 #define DDB3_REG             DDRB
138 #define DDB4_REG             DDRB
139 #define DDB5_REG             DDRB
140
141 /* TCNT0 */
142 #define TCNT00_REG           TCNT0
143 #define TCNT01_REG           TCNT0
144 #define TCNT02_REG           TCNT0
145 #define TCNT03_REG           TCNT0
146 #define TCNT04_REG           TCNT0
147 #define TCNT05_REG           TCNT0
148 #define TCNT06_REG           TCNT0
149 #define TCNT07_REG           TCNT0
150
151 /* ACSR */
152 #define ACIS0_REG            ACSR
153 #define ACIS1_REG            ACSR
154 #define ACIE_REG             ACSR
155 #define ACI_REG              ACSR
156 #define ACO_REG              ACSR
157 #define AINBG_REG            ACSR
158 #define ACD_REG              ACSR
159
160 /* EEDR */
161 #define EEDR0_REG            EEDR
162 #define EEDR1_REG            EEDR
163 #define EEDR2_REG            EEDR
164 #define EEDR3_REG            EEDR
165 #define EEDR4_REG            EEDR
166 #define EEDR5_REG            EEDR
167 #define EEDR6_REG            EEDR
168 #define EEDR7_REG            EEDR
169
170 /* SREG */
171 #define C_REG                SREG
172 #define Z_REG                SREG
173 #define N_REG                SREG
174 #define V_REG                SREG
175 #define S_REG                SREG
176 #define H_REG                SREG
177 #define T_REG                SREG
178 #define I_REG                SREG
179
180 /* TIFR */
181 #define TOV0_REG             TIFR
182
183 /* MCUSR */
184 #define PORF_REG             MCUSR
185 #define EXTRF_REG            MCUSR
186 #define BORF_REG             MCUSR
187 #define WDRF_REG             MCUSR
188
189 /* pins mapping */
190 #define MOSI_PORT PORTB
191 #define MOSI_BIT 0
192
193 #define MISO_PORT PORTB
194 #define MISO_BIT 1
195 #define INT0_PORT PORTB
196 #define INT0_BIT 1
197
198 #define SCK_PORT PORTB
199 #define SCK_BIT 2
200 #define T0_PORT PORTB
201 #define T0_BIT 2
202
203 #define CLOCK_PORT PORTB
204 #define CLOCK_BIT 3
205
206
207