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
32 #define PACKET_HAS_MASTER 0
33 #define PACKET_HAS_SLAVE 1
36 #define LEDS_AVAILABLE (AO_LED_RED)
37 #define HAS_EXTERNAL_TEMP 0
38 #define HAS_ACCEL_REF 0
42 #if defined(TELEMETRUM_V_1_1)
47 #define HAS_SERIAL_1 1
53 #define PACKET_HAS_MASTER 0
54 #define PACKET_HAS_SLAVE 1
57 #define LEDS_AVAILABLE (AO_LED_RED)
58 #define HAS_EXTERNAL_TEMP 0
59 #define HAS_ACCEL_REF 1
60 #define SPI_CS_ON_P1 1
61 #define SPI_CS_ON_P0 0
62 #define M25_CS_MASK 0x02 /* CS0 is P1_1 */
63 #define M25_MAX_CHIPS 1
67 #if defined(TELEDONGLE_V_0_2)
71 #define HAS_SERIAL_1 0
77 #define PACKET_HAS_MASTER 1
78 #define PACKET_HAS_SLAVE 0
80 #define AO_LED_GREEN 2
81 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
82 #define SPI_CS_ON_P1 1
83 #define SPI_CS_ON_P0 0
86 #if defined(TELEMINI_V_0_1)
91 #define HAS_SERIAL_1 0
95 #define PACKET_HAS_MASTER 0
96 #define PACKET_HAS_SLAVE 1
98 #define AO_LED_GREEN 1
100 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
101 #define HAS_EXTERNAL_TEMP 0
105 #if defined(TELEMETRUM_V_0_1)
110 #define HAS_SERIAL_1 1
116 #define PACKET_HAS_MASTER 0
117 #define PACKET_HAS_SLAVE 1
119 #define AO_LED_GREEN 1
120 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
121 #define HAS_EXTERNAL_TEMP 1
122 #define HAS_ACCEL_REF 0
123 #define SPI_CS_ON_P1 1
124 #define SPI_CS_ON_P0 0
128 #if defined(TELEDONGLE_V_0_1)
132 #define HAS_SERIAL_1 0
138 #define PACKET_HAS_MASTER 1
139 #define PACKET_HAS_SLAVE 0
141 #define AO_LED_GREEN 1
142 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
143 #define SPI_CS_ON_P1 0
144 #define SPI_CS_ON_P0 1
147 #if defined(TIDONGLE)
151 #define HAS_SERIAL_1 0
157 #define PACKET_HAS_MASTER 1
158 #define PACKET_HAS_SLAVE 0
160 #define LEDS_AVAILABLE (AO_LED_RED)
161 #define SPI_CS_ON_P1 0
162 #define SPI_CS_ON_P0 1
167 #define DBG_CLOCK (1 << 4) /* mi0 */
168 #define DBG_DATA (1 << 5) /* mo0 */
169 #define DBG_RESET_N (1 << 3) /* c0 */
171 #define DBG_CLOCK_PIN (P1_4)
172 #define DBG_DATA_PIN (P1_5)
173 #define DBG_RESET_N_PIN (P1_3)
175 #define DBG_PORT_NUM 1
177 #define DBG_PORT_SEL P1SEL
178 #define DBG_PORT_INP P1INP
179 #define DBG_PORT_DIR P1DIR
181 #endif /* DBG_ON_P1 */
185 #define DBG_CLOCK (1 << 3)
186 #define DBG_DATA (1 << 4)
187 #define DBG_RESET_N (1 << 5)
189 #define DBG_CLOCK_PIN (P0_3)
190 #define DBG_DATA_PIN (P0_4)
191 #define DBG_RESET_N_PIN (P0_5)
193 #define DBG_PORT_NUM 0
195 #define DBG_PORT_SEL P0SEL
196 #define DBG_PORT_INP P0INP
197 #define DBG_PORT_DIR P0DIR
199 #endif /* DBG_ON_P0 */
202 #define SPI_CS_PORT P1
203 #define SPI_CS_SEL P1SEL
204 #define SPI_CS_DIR P1DIR
208 #define SPI_CS_PORT P0
209 #define SPI_CS_SEL P0SEL
210 #define SPI_CS_DIR P0DIR
214 #error Please define HAS_SERIAL_1
218 #error Please define HAS_ADC
222 #error Please define HAS_EEPROM
226 #error Please define HAS_DBG
229 #ifndef PACKET_HAS_MASTER
230 #error Please define PACKET_HAS_MASTER
233 #ifndef PACKET_HAS_SLAVE
234 #error Please define PACKET_HAS_SLAVE
237 #endif /* _AO_PINS_H_ */