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
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
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
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(TELEMETRUM_V_0_1)
121 #define HAS_SERIAL_1 1
128 #define IGNITE_ON_P2 1
129 #define IGNITE_ON_P0 0
130 #define PACKET_HAS_MASTER 0
131 #define PACKET_HAS_SLAVE 1
133 #define AO_LED_GREEN 1
134 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
135 #define HAS_EXTERNAL_TEMP 1
136 #define HAS_ACCEL_REF 0
137 #define SPI_CS_ON_P1 1
138 #define SPI_CS_ON_P0 0
142 #if defined(TELEDONGLE_V_0_1)
146 #define HAS_SERIAL_1 0
152 #define IGNITE_ON_P2 0
153 #define IGNITE_ON_P0 0
154 #define PACKET_HAS_MASTER 1
155 #define PACKET_HAS_SLAVE 0
157 #define AO_LED_GREEN 1
158 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
159 #define SPI_CS_ON_P1 0
160 #define SPI_CS_ON_P0 1
163 #if defined(TIDONGLE)
167 #define HAS_SERIAL_1 0
173 #define IGNITE_ON_P2 0
174 #define IGNITE_ON_P0 0
175 #define PACKET_HAS_MASTER 1
176 #define PACKET_HAS_SLAVE 0
178 #define LEDS_AVAILABLE (AO_LED_RED)
179 #define SPI_CS_ON_P1 0
180 #define SPI_CS_ON_P0 1
185 #define DBG_CLOCK (1 << 4) /* mi0 */
186 #define DBG_DATA (1 << 5) /* mo0 */
187 #define DBG_RESET_N (1 << 3) /* c0 */
189 #define DBG_CLOCK_PIN (P1_4)
190 #define DBG_DATA_PIN (P1_5)
191 #define DBG_RESET_N_PIN (P1_3)
193 #define DBG_PORT_NUM 1
195 #define DBG_PORT_SEL P1SEL
196 #define DBG_PORT_INP P1INP
197 #define DBG_PORT_DIR P1DIR
199 #endif /* DBG_ON_P1 */
203 #define DBG_CLOCK (1 << 3)
204 #define DBG_DATA (1 << 4)
205 #define DBG_RESET_N (1 << 5)
207 #define DBG_CLOCK_PIN (P0_3)
208 #define DBG_DATA_PIN (P0_4)
209 #define DBG_RESET_N_PIN (P0_5)
211 #define DBG_PORT_NUM 0
213 #define DBG_PORT_SEL P0SEL
214 #define DBG_PORT_INP P0INP
215 #define DBG_PORT_DIR P0DIR
217 #endif /* DBG_ON_P0 */
220 #define SPI_CS_PORT P1
221 #define SPI_CS_SEL P1SEL
222 #define SPI_CS_DIR P1DIR
226 #define SPI_CS_PORT P0
227 #define SPI_CS_SEL P0SEL
228 #define SPI_CS_DIR P0DIR
232 #error Please define IGNITE_ON_P2
236 #error Please define IGNITE_ON_P0
240 #error Please define HAS_SERIAL_1
244 #error Please define HAS_ADC
248 #error Please define HAS_EEPROM
252 #error Please define HAS_DBG
255 #ifndef PACKET_HAS_MASTER
256 #error Please define PACKET_HAS_MASTER
259 #ifndef PACKET_HAS_SLAVE
260 #error Please define PACKET_HAS_SLAVE
263 #endif /* _AO_PINS_H_ */