drv_sdram.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #ifndef __DRV_SDRAM_H__
  11. #define __DRV_SDRAM_H__
  12. /*******************************************************************************
  13. * Include files
  14. ******************************************************************************/
  15. /* C binding of definitions if building with C++ compiler */
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /*******************************************************************************
  20. * Global type definitions ('typedef')
  21. ******************************************************************************/
  22. /*******************************************************************************
  23. * Global pre-processor symbols/macros ('#define')
  24. ******************************************************************************/
  25. #if defined (HC32F4A0)
  26. #define EXMC_EXCLK_DMC_MAX_FREQ (40UL * 1000000UL)
  27. #elif defined (HC32F4A8)
  28. #define EXMC_EXCLK_DMC_MAX_FREQ (120UL * 1000000UL)
  29. #endif
  30. /*******************************************************************************
  31. * Global variable definitions ('extern')
  32. ******************************************************************************/
  33. /*******************************************************************************
  34. * Global function prototypes (definition in C source)
  35. ******************************************************************************/
  36. int rt_hw_sdram_init(void);
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif /* __DRV_SDRAM_H__ */