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 11 #ifndef __DRV_QSPI_H__ 12 #define __DRV_QSPI_H__ 13 14 #include <rtthread.h> 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 #ifdef BSP_USING_QSPI1 21 #define QSPI1_BUS_CONFIG \ 22 { \ 23 .qspi_x = QSPI1, \ 24 .bus_name = "qspi1", \ 25 } 26 #endif /* BSP_USING_QSPI1 */ 27 28 #ifdef BSP_USING_QSPI2 29 #define QSPI2_BUS_CONFIG \ 30 { \ 31 .qspi_x = QSPI2, \ 32 .bus_name = "qspi2", \ 33 } 34 #endif /* BSP_USING_QSPI2 */ 35 36 rt_err_t rt_hw_qspi_device_attach(const char *bus_name, const char *device_name, rt_base_t cs_pin, rt_uint8_t data_line_width, void (*enter_qspi_mode)(), void (*exit_qspi_mode)()); 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 #endif /* __DRV_QSPI_H__ */ 43