mirror of
git://soft.sys114.com/klipper
synced 2026-02-13 16:40:34 +09:00
lib: Add hc32f460 definitions
Signed-off-by: Steven Gotthardt <gotthardt@gmail.com>
This commit is contained in:
committed by
Kevin O'Connor
parent
1e7057e917
commit
94cbf5ff48
79
lib/hc32f460/driver/src/hc32f460_icg.c
Normal file
79
lib/hc32f460/driver/src/hc32f460_icg.c
Normal file
@@ -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)
|
||||
*****************************************************************************/
|
||||
Reference in New Issue
Block a user