diff options
author | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
commit | dc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch) | |
tree | 4ccb8fa5886b66fa9d480edef74236c27f035e16 /lib/chibios-contrib/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h |
Diffstat (limited to 'lib/chibios-contrib/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h')
-rw-r--r-- | lib/chibios-contrib/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h b/lib/chibios-contrib/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h new file mode 100644 index 000000000..262d06de0 --- /dev/null +++ b/lib/chibios-contrib/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2015 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 Freescale Freedom K20D50M board. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Board identifier. | ||
26 | */ | ||
27 | #define BOARD_FREESCALE_FREEDOM_K20D50M | ||
28 | #define BOARD_NAME "Freescale Freedom K20D50M" | ||
29 | |||
30 | /* External 8 MHz crystal. */ | ||
31 | #define KINETIS_XTAL_FREQUENCY 8000000UL | ||
32 | |||
33 | /* | ||
34 | * MCU type | ||
35 | */ | ||
36 | #define K20x5 | ||
37 | |||
38 | /* | ||
39 | * Onboard features. | ||
40 | */ | ||
41 | #define GPIO_LED_RED IOPORT3 | ||
42 | #define PIN_LED_RED 3 | ||
43 | #define GPIO_LED_GREEN IOPORT4 | ||
44 | #define PIN_LED_GREEN 4 | ||
45 | #define GPIO_LED_BLUE IOPORT1 | ||
46 | #define PIN_LED_BLUE 2 | ||
47 | |||
48 | /* Inertial sensor: MMA8451Q */ | ||
49 | /* Default I2C address 0x1D */ | ||
50 | #define I2C_GYRO I2C0 | ||
51 | |||
52 | #define LINE_LED_RED PAL_LINE(GPIO_LED_RED, PIN_LED_RED) | ||
53 | #define LINE_LED_GREEN PAL_LINE(GPIO_LED_GREEN, PIN_LED_GREEN) | ||
54 | #define LINE_LED_BLUE PAL_LINE(GPIO_LED_BLUE, PIN_LED_BLUE) | ||
55 | #define LINE_GYRO_SCL PAL_LINE(GPIOB, 0U) | ||
56 | #define LINE_GYRO_SDA PAL_LINE(GPIOB, 1U) | ||
57 | #define LINE_GYRO_INT1 PAL_LINE(GPIOC, 11U) | ||
58 | #define LINE_GYRO_INT2 PAL_LINE(GPIOC, 6U) | ||
59 | |||
60 | #if !defined(_FROM_ASM_) | ||
61 | #ifdef __cplusplus | ||
62 | extern "C" { | ||
63 | #endif | ||
64 | void boardInit(void); | ||
65 | #ifdef __cplusplus | ||
66 | } | ||
67 | #endif | ||
68 | #endif /* _FROM_ASM_ */ | ||
69 | |||
70 | #endif /* _BOARD_H_ */ | ||