1 /* 2 * Copyright (C) 2022-2024, Xiaohua Semiconductor Co., Ltd. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2023-02-14 CDT first version 9 */ 10 11 #ifndef __DRV_SDRAM_H__ 12 #define __DRV_SDRAM_H__ 13 14 /******************************************************************************* 15 * Include files 16 ******************************************************************************/ 17 18 /* C binding of definitions if building with C++ compiler */ 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 /******************************************************************************* 24 * Global type definitions ('typedef') 25 ******************************************************************************/ 26 27 /******************************************************************************* 28 * Global pre-processor symbols/macros ('#define') 29 ******************************************************************************/ 30 #if defined (HC32F4A0) 31 #define EXMC_EXCLK_DMC_MAX_FREQ (40UL * 1000000UL) 32 #elif defined (HC32F4A8) 33 #define EXMC_EXCLK_DMC_MAX_FREQ (120UL * 1000000UL) 34 #endif 35 36 /******************************************************************************* 37 * Global variable definitions ('extern') 38 ******************************************************************************/ 39 40 /******************************************************************************* 41 * Global function prototypes (definition in C source) 42 ******************************************************************************/ 43 int rt_hw_sdram_init(void); 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif /* __DRV_SDRAM_H__ */ 50