1
0

spi_flash.h 847 B

1234567891011121314151617181920212223242526272829303132333435
  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. * 2016/5/20 bernard the first version
  9. */
  10. #ifndef SPI_FLASH_H__
  11. #define SPI_FLASH_H__
  12. struct spi_flash_device
  13. {
  14. struct rt_device flash_device;
  15. struct rt_device_blk_geometry geometry;
  16. struct rt_spi_device * rt_spi_device;
  17. struct rt_mutex lock;
  18. void * user_data;
  19. };
  20. typedef struct spi_flash_device *rt_spi_flash_device_t;
  21. #ifdef RT_USING_MTD_NOR
  22. struct spi_flash_mtd
  23. {
  24. struct rt_mtd_nor_device mtd_device;
  25. struct rt_spi_device * rt_spi_device;
  26. struct rt_mutex lock;
  27. void * user_data;
  28. };
  29. #endif
  30. #endif