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)
22 #define HAS_SERIAL_1 1
28 #define PACKET_HAS_MASTER 0
29 #define PACKET_HAS_SLAVE 1
32 #define LEDS_AVAILABLE (AO_LED_RED)
33 #define HAS_EXTERNAL_TEMP 0
36 #if defined(TELEMETRUM_V_1_1)
37 #define HAS_SERIAL_1 1
43 #define PACKET_HAS_MASTER 0
44 #define PACKET_HAS_SLAVE 1
47 #define LEDS_AVAILABLE (AO_LED_RED)
48 #define HAS_EXTERNAL_TEMP 0
49 #define SPI_CS_ON_P1 1
50 #define SPI_CS_ON_P0 0
53 #if defined(TELEDONGLE_V_0_2)
54 #define HAS_SERIAL_1 0
60 #define PACKET_HAS_MASTER 1
61 #define PACKET_HAS_SLAVE 0
63 #define AO_LED_GREEN 2
64 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
65 #define SPI_CS_ON_P1 1
66 #define SPI_CS_ON_P0 0
69 #if defined(TELEMETRUM_V_0_1)
70 #define HAS_SERIAL_1 1
76 #define PACKET_HAS_MASTER 0
77 #define PACKET_HAS_SLAVE 1
79 #define AO_LED_GREEN 1
80 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
81 #define HAS_EXTERNAL_TEMP 1
82 #define SPI_CS_ON_P1 1
83 #define SPI_CS_ON_P0 0
86 #if defined(TELEDONGLE_V_0_1)
87 #define HAS_SERIAL_1 0
93 #define PACKET_HAS_MASTER 1
94 #define PACKET_HAS_SLAVE 0
96 #define AO_LED_GREEN 1
97 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
98 #define SPI_CS_ON_P1 0
99 #define SPI_CS_ON_P0 1
102 #if defined(TIDONGLE)
103 #define HAS_SERIAL_1 0
109 #define PACKET_HAS_MASTER 1
110 #define PACKET_HAS_SLAVE 0
112 #define LEDS_AVAILABLE (AO_LED_RED)
113 #define SPI_CS_ON_P1 0
114 #define SPI_CS_ON_P0 1
119 #define DBG_CLOCK (1 << 4) /* mi0 */
120 #define DBG_DATA (1 << 5) /* mo0 */
121 #define DBG_RESET_N (1 << 3) /* c0 */
123 #define DBG_CLOCK_PIN (P1_4)
124 #define DBG_DATA_PIN (P1_5)
125 #define DBG_RESET_N_PIN (P1_3)
127 #define DBG_PORT_NUM 1
129 #define DBG_PORT_SEL P1SEL
130 #define DBG_PORT_INP P1INP
131 #define DBG_PORT_DIR P1DIR
133 #endif /* DBG_ON_P1 */
137 #define DBG_CLOCK (1 << 3)
138 #define DBG_DATA (1 << 4)
139 #define DBG_RESET_N (1 << 5)
141 #define DBG_CLOCK_PIN (P0_3)
142 #define DBG_DATA_PIN (P0_4)
143 #define DBG_RESET_N_PIN (P0_5)
145 #define DBG_PORT_NUM 0
147 #define DBG_PORT_SEL P0SEL
148 #define DBG_PORT_INP P0INP
149 #define DBG_PORT_DIR P0DIR
151 #endif /* DBG_ON_P0 */
154 #define SPI_CS_PORT P1
155 #define SPI_CS_SEL P1SEL
156 #define SPI_CS_DIR P1DIR
160 #define SPI_CS_PORT P0
161 #define SPI_CS_SEL P0SEL
162 #define SPI_CS_DIR P0DIR
166 #error Please define HAS_SERIAL_1
170 #error Please define HAS_ADC
174 #error Please define HAS_EEPROM
178 #error Please define HAS_DBG
181 #ifndef PACKET_HAS_MASTER
182 #error Please define PACKET_HAS_MASTER
185 #ifndef PACKET_HAS_SLAVE
186 #error Please define PACKET_HAS_SLAVE
189 #endif /* _AO_PINS_H_ */