aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/os/hal/boards/NUTINY-SDK-NUC123-V2.0/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/os/hal/boards/NUTINY-SDK-NUC123-V2.0/board.h')
-rw-r--r--lib/chibios-contrib/os/hal/boards/NUTINY-SDK-NUC123-V2.0/board.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/hal/boards/NUTINY-SDK-NUC123-V2.0/board.h b/lib/chibios-contrib/os/hal/boards/NUTINY-SDK-NUC123-V2.0/board.h
new file mode 100644
index 000000000..9dd49383c
--- /dev/null
+++ b/lib/chibios-contrib/os/hal/boards/NUTINY-SDK-NUC123-V2.0/board.h
@@ -0,0 +1,61 @@
1/*
2 ChibiOS - Copyright (C) 2020 Alex Lewontin
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 a generic board.
22 */
23
24/*
25 * Board identifier.
26 */
27#define NUC123SD4AN0
28#define BOARD_NAME "NUTINY SDK NUC123 V2.0"
29
30/*
31 * Board specific settings.
32 */
33/*
34 * External XTAL speed.
35 */
36#define NUC123_HSECLK 12000000UL
37
38/*
39 * LED macros.
40 */
41#define ONBOARD_LED_LINE PAL_LINE(GPIOB, 4)
42
43#define OnboardLED_Init() \
44 palSetGroupMode(GPIOB, 1, 4, PAL_MODE_OUTPUT_PUSHPULL)
45#define OnboardLED_On() palClearLine(ONBOARD_LED_LINE)
46#define OnboardLED_Off() palSetLine(ONBOARD_LED_LINE)
47#define OnboardLED_Toggle() palToggleLine(ONBOARD_LED_LINE)
48
49#define ONBOARD_SERIAL_DRIVER SD0
50
51#if !defined(_FROM_ASM_)
52#ifdef __cplusplus
53extern "C" {
54#endif
55void boardInit(void);
56#ifdef __cplusplus
57}
58#endif
59#endif /* _FROM_ASM_ */
60
61#endif /* BOARD_H */