aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/os/hal/boards/NRF52-E73-2G4M04S/board.c
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-04-10 12:13:40 +0100
committerAkshay <[email protected]>2022-04-10 12:13:40 +0100
commitdc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch)
tree4ccb8fa5886b66fa9d480edef74236c27f035e16 /lib/chibios-contrib/os/hal/boards/NRF52-E73-2G4M04S/board.c
Diffstat (limited to 'lib/chibios-contrib/os/hal/boards/NRF52-E73-2G4M04S/board.c')
-rw-r--r--lib/chibios-contrib/os/hal/boards/NRF52-E73-2G4M04S/board.c81
1 files changed, 81 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/hal/boards/NRF52-E73-2G4M04S/board.c b/lib/chibios-contrib/os/hal/boards/NRF52-E73-2G4M04S/board.c
new file mode 100644
index 000000000..adf002d8f
--- /dev/null
+++ b/lib/chibios-contrib/os/hal/boards/NRF52-E73-2G4M04S/board.c
@@ -0,0 +1,81 @@
1/*
2 Copyright (C) 2016 Stéphane D'Alu
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#include "hal.h"
18
19#if HAL_USE_PAL || defined(__DOXYGEN__)
20
21/**
22 * @brief PAL setup.
23 * @details Digital I/O ports static configuration as defined in @p board.h.
24 * This variable is used by the HAL when initializing the PAL driver.
25 */
26const PALConfig pal_default_config =
27{
28 .pads = {
29 PAL_MODE_UNCONNECTED, /* P0.0 : XTAL (32MHz) */
30 PAL_MODE_UNCONNECTED, /* P0.1 : XTAL (32MHz) */
31 PAL_MODE_UNCONNECTED, /* P0.2 */
32 PAL_MODE_UNCONNECTED, /* P0.3 */
33 PAL_MODE_UNCONNECTED, /* P0.4 */
34 PAL_MODE_OUTPUT_PUSHPULL, /* P0.5 : UART_RTS */
35 PAL_MODE_OUTPUT_PUSHPULL, /* P0.6 : UART_TX */
36 PAL_MODE_INPUT_PULLUP, /* P0.7 : UART_CTS */
37 PAL_MODE_INPUT_PULLUP, /* P0.8 : UART_RX */
38 PAL_MODE_UNCONNECTED, /* P0.9 */
39 PAL_MODE_UNCONNECTED, /* P0.10 */
40 PAL_MODE_UNCONNECTED, /* P0.11 */
41 PAL_MODE_UNCONNECTED, /* P0.12 */
42 PAL_MODE_INPUT, /* P0.13: BTN1 */
43 PAL_MODE_INPUT, /* P0.14: BTN2 */
44 PAL_MODE_INPUT_PULLUP, /* P0.15: BTN3 */
45 PAL_MODE_INPUT_PULLUP, /* P0.16: BTN4 */
46 PAL_MODE_OUTPUT_PUSHPULL, /* P0.17: LED1 */
47 PAL_MODE_OUTPUT_PUSHPULL, /* P0.18: LED2 */
48 PAL_MODE_OUTPUT_PUSHPULL, /* P0.19: LED3 */
49 PAL_MODE_OUTPUT_PUSHPULL, /* P0.20: LED4 */
50 PAL_MODE_UNCONNECTED, /* P0.21 */
51 PAL_MODE_OUTPUT_PUSHPULL, /* P0.22: SPI_SS */
52 PAL_MODE_INPUT_PULLUP, /* P0.23: SPI_MISO */
53 PAL_MODE_OUTPUT_PUSHPULL, /* P0.24: SPI_MOSI */
54 PAL_MODE_OUTPUT_PUSHPULL, /* P0.25: SPI_SCK */
55 PAL_MODE_OUTPUT_OPENDRAIN, /* P0.26: SDA */
56 PAL_MODE_OUTPUT_OPENDRAIN, /* P0.27: SCL */
57 PAL_MODE_UNCONNECTED, /* P0.28 */
58 PAL_MODE_UNCONNECTED, /* P0.29 */
59 PAL_MODE_UNCONNECTED, /* P0.30 */
60 PAL_MODE_UNCONNECTED, /* P0.31 */
61 },
62};
63#endif
64
65/**
66 * @brief Early initialization code.
67 * @details This initialization is performed just after reset before BSS and
68 * DATA segments initialization.
69 */
70void __early_init(void)
71{
72}
73
74/**
75 * @brief Late initialization code.
76 * @note This initialization is performed after BSS and DATA segments
77 * initialization and before invoking the main() function.
78 */
79void boardInit(void)
80{
81}