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(TELEDONGLE_V_0_2)
37 #define HAS_SERIAL_1 0
43 #define PACKET_HAS_MASTER 1
44 #define PACKET_HAS_SLAVE 1
45 #define PACKET_HAS_SLAVE_CMD 1
47 #define AO_LED_GREEN 2
48 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
51 #if defined(TELEMETRUM_V_0_1)
52 #define HAS_SERIAL_1 1
58 #define PACKET_HAS_MASTER 0
59 #define PACKET_HAS_SLAVE 1
61 #define AO_LED_GREEN 1
62 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
63 #define HAS_EXTERNAL_TEMP 1
66 #if defined(TELEDONGLE_V_0_1)
67 #define HAS_SERIAL_1 0
73 #define PACKET_HAS_MASTER 1
74 #define PACKET_HAS_SLAVE 0
76 #define AO_LED_GREEN 1
77 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
81 #define HAS_SERIAL_1 0
87 #define PACKET_HAS_MASTER 1
88 #define PACKET_HAS_SLAVE 0
90 #define LEDS_AVAILABLE (AO_LED_RED)
95 #define DBG_CLOCK (1 << 4) /* mi0 */
96 #define DBG_DATA (1 << 5) /* mo0 */
97 #define DBG_RESET_N (1 << 3) /* c0 */
99 #define DBG_CLOCK_PIN (P1_4)
100 #define DBG_DATA_PIN (P1_5)
101 #define DBG_RESET_N_PIN (P1_3)
103 #define DBG_PORT_NUM 1
105 #define DBG_PORT_SEL P1SEL
106 #define DBG_PORT_INP P1INP
107 #define DBG_PORT_DIR P1DIR
109 #endif /* DBG_ON_P1 */
113 #define DBG_CLOCK (1 << 3)
114 #define DBG_DATA (1 << 4)
115 #define DBG_RESET_N (1 << 5)
117 #define DBG_CLOCK_PIN (P0_3)
118 #define DBG_DATA_PIN (P0_4)
119 #define DBG_RESET_N_PIN (P0_5)
121 #define DBG_PORT_NUM 0
123 #define DBG_PORT_SEL P0SEL
124 #define DBG_PORT_INP P0INP
125 #define DBG_PORT_DIR P0DIR
127 #endif /* DBG_ON_P0 */
130 #error Please define HAS_SERIAL_1
134 #error Please define HAS_ADC
138 #error Please define HAS_EEPROM
142 #error Please define HAS_DBG
145 #ifndef PACKET_HAS_MASTER
146 #error Please define PACKET_HAS_MASTER
149 #ifndef PACKET_HAS_SLAVE
150 #error Please define PACKET_HAS_SLAVE
153 #endif /* _AO_PINS_H_ */