diff options
author | Steven Gotthardt <gotthardt@gmail.com> | 2022-12-18 15:05:51 -0700 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2023-02-13 12:12:27 -0500 |
commit | 94cbf5ff48199f4652450fbb8de682f662a2cc5a (patch) | |
tree | 1080fbd36d8e41549906404fea3c9d26c2d5ef6b /lib/hc32f460/driver/src/hc32f460_icg.c | |
parent | 1e7057e917c0a663a508ac9b616d77ae53d78297 (diff) | |
download | kutter-94cbf5ff48199f4652450fbb8de682f662a2cc5a.tar.gz kutter-94cbf5ff48199f4652450fbb8de682f662a2cc5a.tar.xz kutter-94cbf5ff48199f4652450fbb8de682f662a2cc5a.zip |
lib: Add hc32f460 definitions
Signed-off-by: Steven Gotthardt <gotthardt@gmail.com>
Diffstat (limited to 'lib/hc32f460/driver/src/hc32f460_icg.c')
-rw-r--r-- | lib/hc32f460/driver/src/hc32f460_icg.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/lib/hc32f460/driver/src/hc32f460_icg.c b/lib/hc32f460/driver/src/hc32f460_icg.c new file mode 100644 index 00000000..fc8bd8ad --- /dev/null +++ b/lib/hc32f460/driver/src/hc32f460_icg.c @@ -0,0 +1,79 @@ +/*******************************************************************************
+ * Copyright (C) 2020, Huada Semiconductor Co., Ltd. All rights reserved.
+ *
+ * This software component is licensed by HDSC under BSD 3-Clause license
+ * (the "License"); You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ */
+/******************************************************************************/
+/** \file hc32f460_icg.c
+ **
+ ** A detailed description is available at
+ ** @link IcgGroup Initialize Configure description @endlink
+ **
+ ** - 2018-10-15 CDT First version for Device Driver Library of ICG.
+ **
+ ******************************************************************************/
+
+/*******************************************************************************
+ * Include files
+ ******************************************************************************/
+#include "hc32f460_icg.h"
+
+/**
+ *******************************************************************************
+ ** \addtogroup IcgGroup
+ ******************************************************************************/
+//@{
+
+/*******************************************************************************
+ * Local type definitions ('typedef')
+ ******************************************************************************/
+
+/*******************************************************************************
+ * Local pre-processor symbols/macros ('#define')
+ ******************************************************************************/
+
+/*******************************************************************************
+ * Global variable definitions (declared in header file with 'extern')
+ ******************************************************************************/
+
+/*******************************************************************************
+ * Local function prototypes ('static')
+ ******************************************************************************/
+
+/*******************************************************************************
+ * Local variable definitions ('static')
+ ******************************************************************************/
+#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
+const uint32_t u32ICG[] __attribute__((section(".icg_sec"))) =
+#elif defined (__CC_ARM)
+const uint32_t u32ICG[] __attribute__((at(0x400))) =
+#elif defined (__ICCARM__)
+__root const uint32_t u32ICG[] @ 0x400 =
+#else
+#error "unsupported compiler!!"
+#endif
+{
+ /* ICG 0~ 3 */
+ ICG0_REGISTER_CONSTANT,
+ ICG1_REGISTER_CONSTANT,
+ ICG2_REGISTER_CONSTANT,
+ ICG3_REGISTER_CONSTANT,
+ /* ICG 4~ 7 */
+ ICG4_REGISTER_CONSTANT,
+ ICG5_REGISTER_CONSTANT,
+ ICG6_REGISTER_CONSTANT,
+ ICG7_REGISTER_CONSTANT,
+};
+
+/*******************************************************************************
+ * Function implementation - global ('extern') and local ('static')
+ ******************************************************************************/
+
+//@} // IcgGroup
+
+/******************************************************************************
+ * EOF (not truncated)
+ *****************************************************************************/
|