rt-thread/components/drivers/spi/spi_flash.h

36 lines
821 B
C
Raw Normal View History

/*
2018-10-14 19:37:18 +08:00
* Copyright (c) 2006-2018, RT-Thread Development Team
*
2018-10-14 19:37:18 +08:00
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2016/5/20 bernard the first version
*/
#ifndef SPI_FLASH_H__
#define SPI_FLASH_H__
struct spi_flash_device
{
struct rt_device flash_device;
struct rt_device_blk_geometry geometry;
struct rt_spi_device * rt_spi_device;
struct rt_mutex lock;
void * user_data;
};
typedef struct spi_flash_device *rt_spi_flash_device_t;
2017-02-13 19:37:53 +08:00
#ifdef RT_USING_MTD_NOR
struct spi_flash_mtd
{
struct rt_mtd_nor_device mtd_device;
struct rt_spi_device * rt_spi_device;
struct rt_mutex lock;
void * user_data;
};
#endif
#endif