2 * Copyright © 2010 Keith Packard <keithp@keithp.com>
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; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 #if defined(TELEMETRUM_V_1_0)
26 #define HAS_SERIAL_1 1
29 #define USE_INTERNAL_FLASH 0
33 #define IGNITE_ON_P2 1
34 #define IGNITE_ON_P0 0
35 #define PACKET_HAS_MASTER 0
36 #define PACKET_HAS_SLAVE 1
39 #define LEDS_AVAILABLE (AO_LED_RED)
40 #define HAS_EXTERNAL_TEMP 0
41 #define HAS_ACCEL_REF 0
46 #if defined(TELEMETRUM_V_1_1)
51 #define HAS_SERIAL_1 1
54 #define USE_INTERNAL_FLASH 0
58 #define IGNITE_ON_P2 1
59 #define IGNITE_ON_P0 0
60 #define PACKET_HAS_MASTER 0
61 #define PACKET_HAS_SLAVE 1
64 #define LEDS_AVAILABLE (AO_LED_RED)
65 #define HAS_EXTERNAL_TEMP 0
66 #define HAS_ACCEL_REF 1
67 #define SPI_CS_ON_P1 1
68 #define SPI_CS_ON_P0 0
69 #define M25_CS_MASK 0x02 /* CS0 is P1_1 */
70 #define M25_MAX_CHIPS 1
75 #if defined(TELEDONGLE_V_0_2)
79 #define HAS_SERIAL_1 0
85 #define IGNITE_ON_P2 0
86 #define IGNITE_ON_P0 0
87 #define PACKET_HAS_MASTER 1
88 #define PACKET_HAS_SLAVE 0
90 #define AO_LED_GREEN 2
91 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
92 #define SPI_CS_ON_P1 1
93 #define SPI_CS_ON_P0 0
97 #if defined(TELEMINI_V_0_1)
102 #define HAS_SERIAL_1 0
105 #define USE_INTERNAL_FLASH 1
107 #define IGNITE_ON_P2 0
108 #define IGNITE_ON_P0 1
109 #define PACKET_HAS_MASTER 0
110 #define PACKET_HAS_SLAVE 1
112 #define AO_LED_GREEN 1
114 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
115 #define HAS_EXTERNAL_TEMP 0
120 #if defined(TELENANO_V_0_1)
125 #define HAS_SERIAL_1 0
128 #define USE_INTERNAL_FLASH 1
130 #define IGNITE_ON_P2 0
131 #define IGNITE_ON_P0 1
132 #define PACKET_HAS_MASTER 0
133 #define PACKET_HAS_SLAVE 1
135 #define AO_LED_GREEN 1
137 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
138 #define HAS_EXTERNAL_TEMP 0
143 #if defined(TELEMETRUM_V_0_1)
148 #define HAS_SERIAL_1 1
152 #define USE_INTERNAL_FLASH 0
155 #define IGNITE_ON_P2 1
156 #define IGNITE_ON_P0 0
157 #define PACKET_HAS_MASTER 0
158 #define PACKET_HAS_SLAVE 1
160 #define AO_LED_GREEN 1
161 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
162 #define HAS_EXTERNAL_TEMP 1
163 #define HAS_ACCEL_REF 0
164 #define SPI_CS_ON_P1 1
165 #define SPI_CS_ON_P0 0
170 #if defined(TELEDONGLE_V_0_1)
174 #define HAS_SERIAL_1 0
180 #define IGNITE_ON_P2 0
181 #define IGNITE_ON_P0 0
182 #define PACKET_HAS_MASTER 1
183 #define PACKET_HAS_SLAVE 0
185 #define AO_LED_GREEN 1
186 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
187 #define SPI_CS_ON_P1 0
188 #define SPI_CS_ON_P0 1
192 #if defined(TIDONGLE)
196 #define HAS_SERIAL_1 0
202 #define IGNITE_ON_P2 0
203 #define IGNITE_ON_P0 0
204 #define PACKET_HAS_MASTER 1
205 #define PACKET_HAS_SLAVE 0
207 #define LEDS_AVAILABLE (AO_LED_RED)
208 #define SPI_CS_ON_P1 0
209 #define SPI_CS_ON_P0 1
215 #define DBG_CLOCK (1 << 4) /* mi0 */
216 #define DBG_DATA (1 << 5) /* mo0 */
217 #define DBG_RESET_N (1 << 3) /* c0 */
219 #define DBG_CLOCK_PIN (P1_4)
220 #define DBG_DATA_PIN (P1_5)
221 #define DBG_RESET_N_PIN (P1_3)
223 #define DBG_PORT_NUM 1
225 #define DBG_PORT_SEL P1SEL
226 #define DBG_PORT_INP P1INP
227 #define DBG_PORT_DIR P1DIR
229 #endif /* DBG_ON_P1 */
233 #define DBG_CLOCK (1 << 3)
234 #define DBG_DATA (1 << 4)
235 #define DBG_RESET_N (1 << 5)
237 #define DBG_CLOCK_PIN (P0_3)
238 #define DBG_DATA_PIN (P0_4)
239 #define DBG_RESET_N_PIN (P0_5)
241 #define DBG_PORT_NUM 0
243 #define DBG_PORT_SEL P0SEL
244 #define DBG_PORT_INP P0INP
245 #define DBG_PORT_DIR P0DIR
247 #endif /* DBG_ON_P0 */
250 #define SPI_CS_PORT P1
251 #define SPI_CS_SEL P1SEL
252 #define SPI_CS_DIR P1DIR
256 #define SPI_CS_PORT P0
257 #define SPI_CS_SEL P0SEL
258 #define SPI_CS_DIR P0DIR
262 #error Please define IGNITE_ON_P2
266 #error Please define IGNITE_ON_P0
270 #error Please define HAS_SERIAL_1
274 #error Please define HAS_ADC
278 #error Please define HAS_EEPROM
282 #ifndef USE_INTERNAL_FLASH
283 #error Please define USE_INTERNAL_FLASH
288 #error Please define HAS_DBG
292 #error Please define HAS_IGNITE
295 #ifndef PACKET_HAS_MASTER
296 #error Please define PACKET_HAS_MASTER
299 #ifndef PACKET_HAS_SLAVE
300 #error Please define PACKET_HAS_SLAVE
303 #endif /* _AO_PINS_H_ */