drv_qspi.h 762 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Email: opensource_embedded@phytium.com.cn
  7. *
  8. * Change Logs:
  9. * Date Author Notes
  10. * 2023-03-20 zhangyan first version
  11. *
  12. */
  13. #ifndef __DRV_QSPI_H__
  14. #define __DRV_QSPI_H__
  15. #include "rtdef.h"
  16. #include "fqspi_flash.h"
  17. #include "fqspi_hw.h"
  18. #ifdef __cplusplus
  19. extern "C"
  20. {
  21. #endif
  22. typedef struct
  23. {
  24. rt_uint32_t fqspi_id;
  25. const char *name;
  26. rt_uint32_t init; /* 0 is init already */
  27. FQspiCtrl fqspi;
  28. struct rt_spi_bus qspi_bus;
  29. } phytium_qspi_bus;
  30. rt_err_t phytium_qspi_bus_attach_device(const char *bus_name, const char *device_name);
  31. int rt_hw_qspi_init(void);
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif // !DRT_QSPI_H