summaryrefslogtreecommitdiff
path: root/bsp/hc32/libraries/hc32_drivers/drv_sdram.h
blob: 5afd35dab8808ce0bff5bc8ed0845008606e50fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Copyright (C) 2022-2024, Xiaohua Semiconductor Co., Ltd.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-02-14     CDT          first version
 */

#ifndef __DRV_SDRAM_H__
#define __DRV_SDRAM_H__

/*******************************************************************************
 * Include files
 ******************************************************************************/

/* C binding of definitions if building with C++ compiler */
#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
 * Global type definitions ('typedef')
 ******************************************************************************/

/*******************************************************************************
 * Global pre-processor symbols/macros ('#define')
 ******************************************************************************/
#if defined (HC32F4A0)
#define EXMC_EXCLK_DMC_MAX_FREQ             (40UL * 1000000UL)
#elif defined (HC32F4A8)
#define EXMC_EXCLK_DMC_MAX_FREQ             (120UL * 1000000UL)
#endif

/*******************************************************************************
 * Global variable definitions ('extern')
 ******************************************************************************/

/*******************************************************************************
 * Global function prototypes (definition in C source)
 ******************************************************************************/
int rt_hw_sdram_init(void);

#ifdef __cplusplus
}
#endif

#endif /* __DRV_SDRAM_H__ */