diff options
Diffstat (limited to 'lib/chibios/os/hal/boards/OLIMEX_SAM7_EX256/board.h')
-rw-r--r-- | lib/chibios/os/hal/boards/OLIMEX_SAM7_EX256/board.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/OLIMEX_SAM7_EX256/board.h b/lib/chibios/os/hal/boards/OLIMEX_SAM7_EX256/board.h new file mode 100644 index 000000000..3f5bc0c3d --- /dev/null +++ b/lib/chibios/os/hal/boards/OLIMEX_SAM7_EX256/board.h | |||
@@ -0,0 +1,101 @@ | |||
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 SAM7-EX256 development board. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Board identifier. | ||
26 | */ | ||
27 | #define BOARD_OLIMEX_SAM7_EX256 | ||
28 | #define BOARD_NAME "Olimex SAM7-EX256" | ||
29 | |||
30 | /* | ||
31 | * Select your platform by modifying the following line. | ||
32 | */ | ||
33 | #if !defined(SAM7_PLATFORM) | ||
34 | #define SAM7_PLATFORM SAM7X256 | ||
35 | #endif | ||
36 | |||
37 | #include "at91sam7.h" | ||
38 | |||
39 | #define CLK 18432000 | ||
40 | #define MCK 48054857 | ||
41 | |||
42 | /* | ||
43 | * Initial I/O setup. | ||
44 | */ | ||
45 | #define VAL_PIOA_ODSR 0x00000000 /* Output data. */ | ||
46 | #define VAL_PIOA_OSR 0x00000000 /* Direction. */ | ||
47 | #define VAL_PIOA_PUSR 0xFFFFFFFF /* Pull-up. */ | ||
48 | |||
49 | #define VAL_PIOB_ODSR 0x00000000 /* Output data. */ | ||
50 | #define VAL_PIOB_OSR 0x00000000 /* Direction. */ | ||
51 | #define VAL_PIOB_PUSR 0xFFFFFFFF /* Pull-up. */ | ||
52 | |||
53 | /* | ||
54 | * I/O definitions. | ||
55 | */ | ||
56 | #define PIOA_LCD_RESET 2 | ||
57 | #define PIOA_LCD_RESET_MASK (1 << PIOA_LCD_RESET) | ||
58 | #define PIOA_B1 7 | ||
59 | #define PIOA_B1_MASK (1 << PIOA_B1) | ||
60 | #define PIOA_B2 8 | ||
61 | #define PIOA_B2_MASK (1 << PIOA_B2) | ||
62 | #define PIOA_B3 9 | ||
63 | #define PIOA_B3_MASK (1 << PIOA_B3) | ||
64 | #define PIOA_B4 14 | ||
65 | #define PIOA_B4_MASK (1 << PIOA_B4) | ||
66 | #define PIOA_B5 15 | ||
67 | #define PIOA_B5_MASK (1 << PIOA_B5) | ||
68 | #define PIOA_USB_PUP 25 | ||
69 | #define PIOA_USB_PUP_MASK (1 << PIOA_USB_PUP) | ||
70 | #define PIOA_USB_PR 26 | ||
71 | #define PIOA_USB_PR_MASK (1 << PIOA_USB_PR) | ||
72 | #define PIOA_CS_MMC 13 | ||
73 | |||
74 | #define PIOB_PHY_PD 18 | ||
75 | #define PIOB_PHY_PD_MASK (1 << PIOB_PHY_PD) | ||
76 | #define PIOB_AUDIO_OUT 19 | ||
77 | #define PIOB_AUDIO_OUT_MASK (1 << PIOB_AUDIO_OUT) | ||
78 | #define PIOB_LCD_BL 20 | ||
79 | #define PIOB_LCD_BL_MASK (1 << PIOB_LCD_BL) | ||
80 | #define PIOB_MMC_WP 22 | ||
81 | #define PIOB_MMC_WP_MASK (1 << PIOB_MMC_WP) | ||
82 | #define PIOB_MMC_CP 23 | ||
83 | #define PIOB_MMC_CP_MASK (1 << PIOB_MMC_CP) | ||
84 | #define PIOB_SW1 24 | ||
85 | #define PIOB_SW1_MASK (1 << PIOB_SW1) | ||
86 | #define PIOB_SW2 25 | ||
87 | #define PIOB_SW2_MASK (1 << PIOB_SW2) | ||
88 | #define PIOB_PHY_IRQ 26 | ||
89 | #define PIOB_PHY_IRQ_MASK (1 << PIOB_PHY_IRQ) | ||
90 | |||
91 | #if !defined(_FROM_ASM_) | ||
92 | #ifdef __cplusplus | ||
93 | extern "C" { | ||
94 | #endif | ||
95 | void boardInit(void); | ||
96 | #ifdef __cplusplus | ||
97 | } | ||
98 | #endif | ||
99 | #endif /* _FROM_ASM_ */ | ||
100 | |||
101 | #endif /* _BOARD_H_ */ | ||