0f2b1ea60f2fb8d826db8619852d18db6e24b981
[fw/altos] / src / usbtrng / ao_pins.h
1 /*
2  * Copyright © 2013 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 #define HAS_BEEP        0
19
20 #define AO_STACK_SIZE   384
21
22 #define IS_FLASH_LOADER 0
23
24 /* Crystal on the board */
25 #define AO_LPC_CLKIN    12000000
26
27 /* Main clock frequency. 48MHz for USB so we don't use the USB PLL */
28 #define AO_LPC_CLKOUT   48000000
29
30 /* System clock frequency */
31 #define AO_LPC_SYSCLK   24000000
32
33 #define HAS_USB         1
34
35 #define HAS_USB_CONNECT 0
36 #define HAS_USB_VBUS    0
37 #define HAS_USB_PULLUP  1
38 #define AO_USB_PULLUP_PORT      0
39 #define AO_USB_PULLUP_PIN       6
40
41 /* USART */
42
43 #define HAS_SERIAL              1
44 #define USE_SERIAL_0_STDIN      0
45 #define SERIAL_0_18_19          1
46 #define SERIAL_0_14_15          0
47 #define SERIAL_0_17_18          0
48 #define SERIAL_0_26_27          0
49
50 /* SPI */
51
52 #define HAS_SPI_0               0
53 #define SPI_SCK0_P0_6           0
54 #define HAS_SPI_1               1
55 #define SPI_SCK1_P1_15          0
56 #define SPI_MISO1_P0_22         1
57 #define SPI_MOSI1_P0_21         0
58
59 /* LED */
60
61 #define LED_PORT                0
62 #define LED_PIN_RED             3
63 #define LED_PIN_GREEN           21
64 #define AO_LED_RED              (1 << LED_PIN_RED)
65 #define AO_LED_GREEN            (1 << LED_PIN_GREEN)
66
67 #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
68
69 /* Kludge the SPI driver to not configure any
70  * pin for SCK or MOSI
71  */
72 #define HAS_SCK1                0
73 #define HAS_MOSI1               0
74
75 #define AO_ADC_6                1