Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / src / teledongle-v1.9 / ao_pins.h
1 /*
2  * Copyright © 2012 Keith Packard <keithp@keithp.com>
3  *
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.
7  *
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.
12  *
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.
16  */
17
18 /* Using TeleMetrum v1.9 board */
19
20 #ifndef _AO_PINS_H_
21 #define _AO_PINS_H_
22
23 #define AO_STACK_SIZE   324
24
25 #define HAS_TASK_QUEUE          1
26
27 #define IS_FLASH_LOADER 0
28
29 /* Crystal on the board */
30 #define AO_LPC_CLKIN    12000000
31
32 /* Main clock frequency. 48MHz for USB so we don't use the USB PLL */
33 #define AO_LPC_CLKOUT   48000000
34
35 /* System clock frequency */
36 #define AO_LPC_SYSCLK   24000000
37
38 #define HAS_EEPROM              0
39 #define USE_INTERNAL_FLASH      0
40 #define USE_STORAGE_CONFIG      0
41 #define USE_EEPROM_CONFIG       0
42
43 #define HAS_USB                 1
44 #define HAS_USB_CONNECT         0
45 #define HAS_USB_VBUS            0
46 #define HAS_USB_PULLUP          1
47 #define AO_USB_PULLUP_PORT      0
48 #define AO_USB_PULLUP_PIN       20
49
50 #define HAS_BEEP                0
51 #define HAS_RADIO               1
52 #define HAS_TELEMETRY           0
53 #define HAS_RSSI                0
54
55 #define HAS_SPI_0               1
56 #define SPI_SCK0_P0_6           1
57
58 #define PACKET_HAS_SLAVE        0
59 #define PACKET_HAS_MASTER       1
60
61 #define LOW_LEVEL_DEBUG         0
62
63 #define LED_PORT                0
64 #define LED_PIN_RED             14
65 #define LED_PIN_GREEN           7
66 #define AO_LED_RED              (1 << LED_PIN_RED)
67 #define AO_LED_GREEN            (1 << LED_PIN_GREEN)
68
69 #define LEDS_AVAILABLE          (AO_LED_RED | AO_LED_GREEN)
70
71 #define HAS_GPS                 0
72 #define HAS_FLIGHT              0
73 #define HAS_ADC                 0
74 #define HAS_LOG                 0
75
76 /*
77  * Telemetry monitoring
78  */
79 #define HAS_MONITOR             1
80 #define LEGACY_MONITOR          0
81 #define HAS_MONITOR_PUT         1
82 #define AO_MONITOR_LED          AO_LED_GREEN
83 #define AO_MONITOR_BAD          AO_LED_RED
84
85 /*
86  * Radio (cc1200)
87  */
88
89 /* gets pretty close to 434.550 */
90
91 #define AO_RADIO_CAL_DEFAULT    5695733
92
93 #define AO_FEC_DEBUG            0
94 #define AO_CC1200_SPI_CS_PORT   0
95 #define AO_CC1200_SPI_CS_PIN    3
96 #define AO_CC1200_SPI_BUS       0
97 #define AO_CC1200_SPI           0
98
99 #define AO_CC1200_INT_PORT      0
100 #define AO_CC1200_INT_PIN       2
101
102 #define AO_CC1200_INT_GPIO      2
103 #define AO_CC1200_INT_GPIO_IOCFG        CC1200_IOCFG2
104
105 /*
106  * Profiling Viterbi decoding
107  */
108
109 #ifndef AO_PROFILE
110 #define AO_PROFILE              0
111 #endif
112
113 #endif /* _AO_PINS_H_ */