wm_psram.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef __WM_PSRAM_H__
  2. #define __WM_PSRAM_H__
  3. #define PSRAM_ADDR_START 0x30000000
  4. #define PSRAM_SIZE_BYTE 0x00800000
  5. typedef enum{
  6. PSRAM_SPI = 0,
  7. PSRAM_QPI,
  8. } psram_mode_t;
  9. /**
  10. * @defgroup Driver_APIs Driver APIs
  11. * @brief Driver APIs
  12. */
  13. /**
  14. * @addtogroup Driver_APIs
  15. * @{
  16. */
  17. /**
  18. * @defgroup PSRAM_Driver_APIs PSRAM Driver APIs
  19. * @brief PSRAM driver APIs
  20. */
  21. /**
  22. * @addtogroup PSRAM_Driver_APIs
  23. * @{
  24. */
  25. /**
  26. * @brief This function is used to init the psram .
  27. *
  28. * @param[in] mode is work mode, PSRAM_SPI or PSRAM_QPI
  29. *
  30. * @retval none
  31. *
  32. * @note None
  33. */
  34. void psram_init(psram_mode_t mode);
  35. /**
  36. * @brief This function is used to Copy block of memory in dma mode .
  37. *
  38. * @param[in] src Pointer to the source of data to be copied
  39. * @param[in] dst Pointer to the destination array where the content is to be copied
  40. * @param[in] num Number of bytes to copy
  41. *
  42. * @retval num Number of bytes that's been copied
  43. *
  44. * @note None
  45. */
  46. int memcpy_dma(unsigned char *dst, unsigned char *src, int num);
  47. /**
  48. * @}
  49. */
  50. /**
  51. * @}
  52. */
  53. #endif