aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/boards/OLIMEX_LPC_P1343/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/boards/OLIMEX_LPC_P1343/board.h')
-rw-r--r--lib/chibios/os/hal/boards/OLIMEX_LPC_P1343/board.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/OLIMEX_LPC_P1343/board.h b/lib/chibios/os/hal/boards/OLIMEX_LPC_P1343/board.h
new file mode 100644
index 000000000..1eae8715a
--- /dev/null
+++ b/lib/chibios/os/hal/boards/OLIMEX_LPC_P1343/board.h
@@ -0,0 +1,104 @@
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 the Olimex LPC-P1343 proto board.
22 */
23
24/*
25 * Board identifiers.
26 */
27#define BOARD_OLIMEX_LPC_P1343
28#define BOARD_NAME "Olimex LPC-P1343"
29
30/*
31 * Board frequencies.
32 */
33#define SYSOSCCLK 12000000
34
35/*
36 * GPIO 0 initial setup.
37 */
38#define VAL_GPIO0DIR 0x00000000
39#define VAL_GPIO0DATA 0x00000000
40
41/*
42 * GPIO 1 initial setup.
43 */
44#define VAL_GPIO1DIR PAL_PORT_BIT(GPIO1_SW2)
45
46#define VAL_GPIO1DATA PAL_PORT_BIT(GPIO1_SW2)
47
48/*
49 * GPIO 2 initial setup.
50 */
51
52#define VAL_GPIO2DIR PAL_PORT_BIT(GPIO2_SW1) | \
53 PAL_PORT_BIT(GPIO2_LED5) | \
54 PAL_PORT_BIT(GPIO2_LED6) | \
55 PAL_PORT_BIT(GPIO2_LED7) | \
56 PAL_PORT_BIT(GPIO2_LED8)
57
58#define VAL_GPIO2DATA PAL_PORT_BIT(GPIO2_LED5) | \
59 PAL_PORT_BIT(GPIO2_LED6) | \
60 PAL_PORT_BIT(GPIO2_LED7) | \
61 PAL_PORT_BIT(GPIO2_LED8)
62
63/*
64 * GPIO 3 initial setup.
65 */
66
67#define VAL_GPIO3DIR PAL_PORT_BIT(GPIO3_LED1) | \
68 PAL_PORT_BIT(GPIO3_LED2) | \
69 PAL_PORT_BIT(GPIO3_LED3) | \
70 PAL_PORT_BIT(GPIO3_LED4)
71
72#define VAL_GPIO3DATA PAL_PORT_BIT(GPIO3_LED1) | \
73 PAL_PORT_BIT(GPIO3_LED2) | \
74 PAL_PORT_BIT(GPIO3_LED3) | \
75 PAL_PORT_BIT(GPIO3_LED4)
76
77/*
78 * Pin definitions.
79 */
80#define GPIO1_SW2 4
81#define GPIO1_SPI0SEL 11
82
83#define GPIO2_SW1 9
84
85#define GPIO3_LED1 0
86#define GPIO3_LED2 1
87#define GPIO3_LED3 2
88#define GPIO3_LED4 3
89#define GPIO2_LED5 4
90#define GPIO2_LED6 5
91#define GPIO2_LED7 6
92#define GPIO2_LED8 7
93
94#if !defined(_FROM_ASM_)
95#ifdef __cplusplus
96extern "C" {
97#endif
98 void boardInit(void);
99#ifdef __cplusplus
100}
101#endif
102#endif /* _FROM_ASM_ */
103
104#endif /* _BOARD_H_ */