diff options
Diffstat (limited to 'lib/chibios/os/hal/boards/OLIMEX_MSP430_P1611/board.h')
-rw-r--r-- | lib/chibios/os/hal/boards/OLIMEX_MSP430_P1611/board.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/OLIMEX_MSP430_P1611/board.h b/lib/chibios/os/hal/boards/OLIMEX_MSP430_P1611/board.h new file mode 100644 index 000000000..44a37d928 --- /dev/null +++ b/lib/chibios/os/hal/boards/OLIMEX_MSP430_P1611/board.h | |||
@@ -0,0 +1,80 @@ | |||
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 MSP430-P1611 proto board. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Board identifier. | ||
26 | */ | ||
27 | #define BOARD_OLIMEX_MSP430_P1611 | ||
28 | #define BOARD_NAME "Olimex MSP430-P1611" | ||
29 | |||
30 | /* | ||
31 | * Clock constants. | ||
32 | */ | ||
33 | #define LFXT1CLK 32768 | ||
34 | #define XT2CLK 8000000 | ||
35 | #define DCOCLK 750000 | ||
36 | |||
37 | /* | ||
38 | * Pin definitions for the Olimex MSP430-P1611 board. | ||
39 | */ | ||
40 | #define P3_O_TXD0 4 | ||
41 | #define P3_O_TXD0_MASK (1 << P3_O_TXD0) | ||
42 | #define P3_I_RXD0 5 | ||
43 | #define P3_I_RXD0_MASK (1 << P3_I_RXD0) | ||
44 | #define P6_O_LED 0 | ||
45 | #define P6_O_LED_MASK (1 << P6_O_LED) | ||
46 | #define P6_I_BUTTON 1 | ||
47 | #define P6_I_BUTTON_MASK (1 << P6_I_BUTTON) | ||
48 | |||
49 | /* | ||
50 | * Initial I/O ports settings. | ||
51 | */ | ||
52 | #define VAL_P1OUT 0x00 | ||
53 | #define VAL_P1DIR 0xFF | ||
54 | |||
55 | #define VAL_P2OUT 0x00 | ||
56 | #define VAL_P2DIR 0xFF | ||
57 | |||
58 | #define VAL_P3OUT P3_O_TXD0_MASK | ||
59 | #define VAL_P3DIR ~P3_I_RXD0_MASK | ||
60 | |||
61 | #define VAL_P4OUT 0x00 | ||
62 | #define VAL_P4DIR 0xFF | ||
63 | |||
64 | #define VAL_P5OUT 0x00 | ||
65 | #define VAL_P5DIR 0xFF | ||
66 | |||
67 | #define VAL_P6OUT P6_O_LED_MASK | ||
68 | #define VAL_P6DIR ~P6_I_BUTTON_MASK | ||
69 | |||
70 | #if !defined(_FROM_ASM_) | ||
71 | #ifdef __cplusplus | ||
72 | extern "C" { | ||
73 | #endif | ||
74 | void boardInit(void); | ||
75 | #ifdef __cplusplus | ||
76 | } | ||
77 | #endif | ||
78 | #endif /* _FROM_ASM_ */ | ||
79 | |||
80 | #endif /* _BOARD_H_ */ | ||