aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.h')
-rw-r--r--lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.h b/lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.h
new file mode 100644
index 000000000..002a2cfad
--- /dev/null
+++ b/lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.h
@@ -0,0 +1,94 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17#ifndef _BOARD_H_
18#define _BOARD_H_
19
20/*
21 * Setup for Olimex LPC-P1227 board.
22 *
23 */
24
25/*
26 * Board identifiers.
27 */
28#define OLIMEX_LPC_P1227
29#define BOARD_NAME "Olimex LPC-P1227"
30
31/*
32 * Board frequencies.
33 */
34#define SYSOSCCLK 12000000
35
36
37/*
38 * GPIO 0 initial setup.
39 */
40#define VAL_GPIO0DIR 0x00000000
41#define VAL_GPIO0DATA 0x00000000
42
43/*
44 * GPIO 1 initial setup.
45 */
46#define VAL_GPIO1DIR PAL_PORT_BIT(GPIO1_LED1) | \
47 PAL_PORT_BIT(GPIO1_LED2) | \
48 PAL_PORT_BIT(GPIO1_BUZZER)
49
50#define VAL_GPIO1DATA PAL_PORT_BIT(GPIO1_LED1)
51
52
53/*
54 * GPIO 2 initial setup.
55 */
56#define VAL_GPIO2DIR PAL_PORT_BIT(GPIO2_LCD_DC) | \
57 PAL_PORT_BIT(GPIO2_LCD_SS) | \
58 PAL_PORT_BIT(GPIO2_LCD_RES)
59#define VAL_GPIO2DATA PAL_PORT_BIT(GPIO2_LCD_SS)
60
61
62/*
63 * Pin definitions.
64 */
65
66#define GPIO1_LED1 5
67#define GPIO1_LED2 4
68#define GPIO1_SW_WAKEUP 3
69#define GPIO1_BUZZER 6
70
71#define GPIO2_SW_USER1 12
72#define GPIO2_SW_USER2 11
73#define GPIO2_SW_USER3 10
74#define GPIO2_LCD_DC 15
75#define GPIO2_LCD_SS 14
76#define GPIO2_LCD_RES 13
77
78/* LCD3310 pins */
79#define LCD3310_RES_PIN GPIO2_LCD_RES
80#define LCD3310_RES_PORT GPIO2
81#define LCD3310_DC_PIN GPIO2_LCD_DC
82#define LCD3310_DC_PORT GPIO2
83
84#if !defined(_FROM_ASM_)
85#ifdef __cplusplus
86extern "C" {
87#endif
88 void boardInit(void);
89#ifdef __cplusplus
90}
91#endif
92#endif /* _FROM_ASM_ */
93
94#endif /* _BOARD_H_ */