drv_qspi.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_QSPI
  17. #ifndef QSPI1_BUS_CONFIG
  18. #define QSPI1_BUS_CONFIG \
  19. { \
  20. .qspi_x = QSPI1, \
  21. .bus_name = "qspi1", \
  22. }
  23. #endif /* QSPI1_BUS_CONFIG */
  24. #ifndef QSPI2_BUS_CONFIG
  25. #define QSPI2_BUS_CONFIG \
  26. { \
  27. .qspi_x = QSPI2, \
  28. .bus_name = "qspi2", \
  29. }
  30. #endif /* QSPI2_BUS_CONFIG */
  31. #endif /* BSP_USING_QSPI */
  32. 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)());
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif /* __DRV_QSPI_H__ */