summaryrefslogtreecommitdiff
path: root/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board
diff options
context:
space:
mode:
authorJoy Lee <chang.li@westberrytech.com>2022-05-23 13:57:24 +0800
committerGitHub <noreply@github.com>2022-05-23 15:57:24 +1000
commit1c7e8b9a9de0f379bad0823e3f0d1c8d9762ea6c (patch)
treec789242e9b7ee43f4c293f4296a2811085e546c5 /platforms/chibios/boards/GENERIC_WB32_FQ95XX/board
parent1182f5b4be6f6ed7ee7a86bd11ef2226a8b04f8e (diff)
Added support for Wb32fq95 (#16871)
Diffstat (limited to 'platforms/chibios/boards/GENERIC_WB32_FQ95XX/board')
-rw-r--r--platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c82
-rw-r--r--platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.h59
-rw-r--r--platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.mk9
3 files changed, 150 insertions, 0 deletions
diff --git a/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c
new file mode 100644
index 0000000000..22b4ff73b5
--- /dev/null
+++ b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c
@@ -0,0 +1,82 @@
+/*
+ Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#include "hal.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void wb32_gpio_init(void) {
+
+#if WB32_HAS_GPIOA
+ rccEnableAPB1(RCC_APB1ENR_GPIOAEN);
+#endif
+
+#if WB32_HAS_GPIOB
+ rccEnableAPB1(RCC_APB1ENR_GPIOBEN);
+#endif
+
+#if WB32_HAS_GPIOC
+ rccEnableAPB1(RCC_APB1ENR_GPIOCEN);
+#endif
+
+#if WB32_HAS_GPIOD
+ rccEnableAPB1(RCC_APB1ENR_GPIODEN);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
+/*
+ * Early initialization code.
+ * This initialization must be performed just after stack setup and before
+ * any other initialization.
+ */
+void __early_init(void) {
+
+ wb32_clock_init();
+ wb32_gpio_init();
+}
+/**
+ * @brief Board-specific initialization code.
+ * @note You can add your board-specific code here.
+ */
+void boardInit(void) {
+
+}
diff --git a/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.h b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.h
new file mode 100644
index 0000000000..fb48b75a25
--- /dev/null
+++ b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.h
@@ -0,0 +1,59 @@
+#pragma once
+/*
+ Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#ifndef BOARD_H
+#define BOARD_H
+
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
+/*
+ * Setup board.
+ */
+
+/*
+ * Board identifier.
+ */
+#if !(defined(WB32FQ95x9) || defined(WB32FQ95xB) || defined(WB32FQ95xC))
+ #define WB32FQ95xB
+#endif
+
+#if !defined(WB32FQ95xx)
+ #define WB32FQ95xx
+#endif
+
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
+
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
+#endif /* BOARD_H */
diff --git a/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.mk b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.mk
new file mode 100644
index 0000000000..842e335905
--- /dev/null
+++ b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.mk
@@ -0,0 +1,9 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/board/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/board
+
+# Shared variables
+ALLCSRC += $(BOARDSRC)
+ALLINC += $(BOARDINC)