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
45 #if defined(TELEMETRUM_V_1_1)
50 #define HAS_SERIAL_1 1
53 #define USE_INTERNAL_FLASH 0
57 #define IGNITE_ON_P2 1
58 #define IGNITE_ON_P0 0
59 #define PACKET_HAS_MASTER 0
60 #define PACKET_HAS_SLAVE 1
63 #define LEDS_AVAILABLE (AO_LED_RED)
64 #define HAS_EXTERNAL_TEMP 0
65 #define HAS_ACCEL_REF 1
66 #define SPI_CS_ON_P1 1
67 #define SPI_CS_ON_P0 0
68 #define M25_CS_MASK 0x02 /* CS0 is P1_1 */
69 #define M25_MAX_CHIPS 1
73 #if defined(TELEDONGLE_V_0_2)
77 #define HAS_SERIAL_1 0
83 #define IGNITE_ON_P2 0
84 #define IGNITE_ON_P0 0
85 #define PACKET_HAS_MASTER 1
86 #define PACKET_HAS_SLAVE 0
88 #define AO_LED_GREEN 2
89 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
90 #define SPI_CS_ON_P1 1
91 #define SPI_CS_ON_P0 0
94 #if defined(TELEMINI_V_0_1)
99 #define HAS_SERIAL_1 0
102 #define USE_INTERNAL_FLASH 1
104 #define IGNITE_ON_P2 0
105 #define IGNITE_ON_P0 1
106 #define PACKET_HAS_MASTER 0
107 #define PACKET_HAS_SLAVE 1
109 #define AO_LED_GREEN 1
111 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
112 #define HAS_EXTERNAL_TEMP 0
116 #if defined(TELENANO_V_0_1)
121 #define HAS_SERIAL_1 0
124 #define USE_INTERNAL_FLASH 1
126 #define IGNITE_ON_P2 0
127 #define IGNITE_ON_P0 1
128 #define PACKET_HAS_MASTER 0
129 #define PACKET_HAS_SLAVE 1
131 #define AO_LED_GREEN 1
133 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
134 #define HAS_EXTERNAL_TEMP 0
138 #if defined(TELEMETRUM_V_0_1)
143 #define HAS_SERIAL_1 1
147 #define USE_INTERNAL_FLASH 0
150 #define IGNITE_ON_P2 1
151 #define IGNITE_ON_P0 0
152 #define PACKET_HAS_MASTER 0
153 #define PACKET_HAS_SLAVE 1
155 #define AO_LED_GREEN 1
156 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
157 #define HAS_EXTERNAL_TEMP 1
158 #define HAS_ACCEL_REF 0
159 #define SPI_CS_ON_P1 1
160 #define SPI_CS_ON_P0 0
164 #if defined(TELEDONGLE_V_0_1)
168 #define HAS_SERIAL_1 0
174 #define IGNITE_ON_P2 0
175 #define IGNITE_ON_P0 0
176 #define PACKET_HAS_MASTER 1
177 #define PACKET_HAS_SLAVE 0
179 #define AO_LED_GREEN 1
180 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
181 #define SPI_CS_ON_P1 0
182 #define SPI_CS_ON_P0 1
185 #if defined(TIDONGLE)
189 #define HAS_SERIAL_1 0
195 #define IGNITE_ON_P2 0
196 #define IGNITE_ON_P0 0
197 #define PACKET_HAS_MASTER 1
198 #define PACKET_HAS_SLAVE 0
200 #define LEDS_AVAILABLE (AO_LED_RED)
201 #define SPI_CS_ON_P1 0
202 #define SPI_CS_ON_P0 1
207 #define DBG_CLOCK (1 << 4) /* mi0 */
208 #define DBG_DATA (1 << 5) /* mo0 */
209 #define DBG_RESET_N (1 << 3) /* c0 */
211 #define DBG_CLOCK_PIN (P1_4)
212 #define DBG_DATA_PIN (P1_5)
213 #define DBG_RESET_N_PIN (P1_3)
215 #define DBG_PORT_NUM 1
217 #define DBG_PORT_SEL P1SEL
218 #define DBG_PORT_INP P1INP
219 #define DBG_PORT_DIR P1DIR
221 #endif /* DBG_ON_P1 */
225 #define DBG_CLOCK (1 << 3)
226 #define DBG_DATA (1 << 4)
227 #define DBG_RESET_N (1 << 5)
229 #define DBG_CLOCK_PIN (P0_3)
230 #define DBG_DATA_PIN (P0_4)
231 #define DBG_RESET_N_PIN (P0_5)
233 #define DBG_PORT_NUM 0
235 #define DBG_PORT_SEL P0SEL
236 #define DBG_PORT_INP P0INP
237 #define DBG_PORT_DIR P0DIR
239 #endif /* DBG_ON_P0 */
242 #define SPI_CS_PORT P1
243 #define SPI_CS_SEL P1SEL
244 #define SPI_CS_DIR P1DIR
248 #define SPI_CS_PORT P0
249 #define SPI_CS_SEL P0SEL
250 #define SPI_CS_DIR P0DIR
254 #error Please define IGNITE_ON_P2
258 #error Please define IGNITE_ON_P0
262 #error Please define HAS_SERIAL_1
266 #error Please define HAS_ADC
270 #error Please define HAS_EEPROM
274 #ifndef USE_INTERNAL_FLASH
275 #error Please define USE_INTERNAL_FLASH
280 #error Please define HAS_DBG
283 #ifndef PACKET_HAS_MASTER
284 #error Please define PACKET_HAS_MASTER
287 #ifndef PACKET_HAS_SLAVE
288 #error Please define PACKET_HAS_SLAVE
291 #endif /* _AO_PINS_H_ */