drv_qspi.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-03-29 shelton first version
  9. */
  10. #ifndef __DRV_QSPI_H__
  11. #define __DRV_QSPI_H__
  12. #include <rtthread.h>
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #ifdef BSP_USING_QSPI1
  17. #define QSPI1_BUS_CONFIG \
  18. { \
  19. .qspi_x = QSPI1, \
  20. .bus_name = "qspi1", \
  21. }
  22. #endif /* BSP_USING_QSPI1 */
  23. #ifdef BSP_USING_QSPI2
  24. #define QSPI2_BUS_CONFIG \
  25. { \
  26. .qspi_x = QSPI2, \
  27. .bus_name = "qspi2", \
  28. }
  29. #endif /* BSP_USING_QSPI2 */
  30. rt_err_t at32_qspi_bus_attach_device(const char *bus_name, const char *device_name, rt_uint32_t pin, rt_uint8_t data_line_width, void (*enter_qspi_mode)(), void (*exit_qspi_mode)());
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif /* __DRV_QSPI_H__ */