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
111 #define USE_FAST_ASCENT_LOG 1
113 #define AO_LED_GREEN 1
115 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
116 #define HAS_EXTERNAL_TEMP 0
121 #if defined(TELENANO_V_0_1)
126 #define HAS_SERIAL_1 0
129 #define USE_INTERNAL_FLASH 1
131 #define IGNITE_ON_P2 0
132 #define IGNITE_ON_P0 1
133 #define PACKET_HAS_MASTER 0
134 #define PACKET_HAS_SLAVE 1
136 #define AO_LED_GREEN 1
138 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
139 #define HAS_EXTERNAL_TEMP 0
144 #if defined(TELEMETRUM_V_0_1)
149 #define HAS_SERIAL_1 1
153 #define USE_INTERNAL_FLASH 0
156 #define IGNITE_ON_P2 1
157 #define IGNITE_ON_P0 0
158 #define PACKET_HAS_MASTER 0
159 #define PACKET_HAS_SLAVE 1
161 #define AO_LED_GREEN 1
162 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
163 #define HAS_EXTERNAL_TEMP 1
164 #define HAS_ACCEL_REF 0
165 #define SPI_CS_ON_P1 1
166 #define SPI_CS_ON_P0 0
171 #if defined(TELEDONGLE_V_0_1)
175 #define HAS_SERIAL_1 0
181 #define IGNITE_ON_P2 0
182 #define IGNITE_ON_P0 0
183 #define PACKET_HAS_MASTER 1
184 #define PACKET_HAS_SLAVE 0
186 #define AO_LED_GREEN 1
187 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
188 #define SPI_CS_ON_P1 0
189 #define SPI_CS_ON_P0 1
193 #if defined(TIDONGLE)
197 #define HAS_SERIAL_1 0
203 #define IGNITE_ON_P2 0
204 #define IGNITE_ON_P0 0
205 #define PACKET_HAS_MASTER 1
206 #define PACKET_HAS_SLAVE 0
208 #define LEDS_AVAILABLE (AO_LED_RED)
209 #define SPI_CS_ON_P1 0
210 #define SPI_CS_ON_P0 1
216 #define DBG_CLOCK (1 << 4) /* mi0 */
217 #define DBG_DATA (1 << 5) /* mo0 */
218 #define DBG_RESET_N (1 << 3) /* c0 */
220 #define DBG_CLOCK_PIN (P1_4)
221 #define DBG_DATA_PIN (P1_5)
222 #define DBG_RESET_N_PIN (P1_3)
224 #define DBG_PORT_NUM 1
226 #define DBG_PORT_SEL P1SEL
227 #define DBG_PORT_INP P1INP
228 #define DBG_PORT_DIR P1DIR
230 #endif /* DBG_ON_P1 */
234 #define DBG_CLOCK (1 << 3)
235 #define DBG_DATA (1 << 4)
236 #define DBG_RESET_N (1 << 5)
238 #define DBG_CLOCK_PIN (P0_3)
239 #define DBG_DATA_PIN (P0_4)
240 #define DBG_RESET_N_PIN (P0_5)
242 #define DBG_PORT_NUM 0
244 #define DBG_PORT_SEL P0SEL
245 #define DBG_PORT_INP P0INP
246 #define DBG_PORT_DIR P0DIR
248 #endif /* DBG_ON_P0 */
251 #define SPI_CS_PORT P1
252 #define SPI_CS_SEL P1SEL
253 #define SPI_CS_DIR P1DIR
257 #define SPI_CS_PORT P0
258 #define SPI_CS_SEL P0SEL
259 #define SPI_CS_DIR P0DIR
263 #error Please define IGNITE_ON_P2
267 #error Please define IGNITE_ON_P0
271 #error Please define HAS_SERIAL_1
275 #error Please define HAS_ADC
279 #error Please define HAS_EEPROM
283 #ifndef USE_INTERNAL_FLASH
284 #error Please define USE_INTERNAL_FLASH
289 #error Please define HAS_DBG
293 #error Please define HAS_IGNITE
296 #ifndef PACKET_HAS_MASTER
297 #error Please define PACKET_HAS_MASTER
300 #ifndef PACKET_HAS_SLAVE
301 #error Please define PACKET_HAS_SLAVE
304 #endif /* _AO_PINS_H_ */