summaryrefslogtreecommitdiff
path: root/bsp/phytium/libraries/drivers/drv_qspi.h
blob: 9a4f4210bab12943bee0856a8f443a557b515dfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Email: [email protected]
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-03-20     zhangyan     first version
 *
 */

#ifndef __DRV_QSPI_H__
#define __DRV_QSPI_H__

#include "rtdef.h"
#include "fqspi_flash.h"
#include "fqspi_hw.h"
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct
{
    rt_uint32_t fqspi_id;
    const char *name;
    rt_uint32_t init; /* 0 is init already */
    FQspiCtrl fqspi;
    struct rt_spi_bus qspi_bus;
} phytium_qspi_bus;

rt_err_t phytium_qspi_bus_attach_device(const char *bus_name, const char *device_name);

int rt_hw_qspi_init(void);

#ifdef __cplusplus
}
#endif
#endif // !DRT_QSPI_H