xref: /nrf52832-nimble/rt-thread/components/drivers/spi/spi_flash.h (revision 167494296f0543431a51b6b1b83e957045294e05)
1 /*
2  * Copyright (c) 2006-2018, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2016/5/20      bernard      the first version
9  */
10 
11 #ifndef SPI_FLASH_H__
12 #define SPI_FLASH_H__
13 
14 struct spi_flash_device
15 {
16     struct rt_device                flash_device;
17     struct rt_device_blk_geometry   geometry;
18     struct rt_spi_device *          rt_spi_device;
19     struct rt_mutex                 lock;
20     void *                          user_data;
21 };
22 
23 typedef struct spi_flash_device *rt_spi_flash_device_t;
24 
25 #ifdef RT_USING_MTD_NOR
26 struct spi_flash_mtd
27 {
28     struct rt_mtd_nor_device 			mtd_device;
29     struct rt_spi_device *     			rt_spi_device;
30     struct rt_mutex            			lock;
31     void *                     			user_data;
32 };
33 #endif
34 
35 #endif
36