1
0

spi_flash_w25qxx.h 950 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * File : spi_flash_w25qxx.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2011, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2011-12-16 aozima the first version
  13. * 2012-08-23 aozima add flash lock.
  14. */
  15. #ifndef SPI_FLASH_W25QXX_H_INCLUDED
  16. #define SPI_FLASH_W25QXX_H_INCLUDED
  17. #include <rtthread.h>
  18. #include <drivers/spi.h>
  19. struct spi_flash_device
  20. {
  21. struct rt_device flash_device;
  22. struct rt_device_blk_geometry geometry;
  23. struct rt_spi_device * rt_spi_device;
  24. struct rt_mutex lock;
  25. };
  26. extern rt_err_t w25qxx_init(const char * flash_device_name,
  27. const char * spi_device_name);
  28. #endif // SPI_FLASH_W25QXX_H_INCLUDED