drv_flash.h 570 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2022-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2025-01-22 chasel first version
  9. */
  10. #ifndef __DRV_FLASH_H__
  11. #define __DRV_FLASH_H__
  12. #include <rtdevice.h>
  13. struct spi_flash_device
  14. {
  15. struct rt_device flash_device;
  16. struct rt_device_blk_geometry geometry;
  17. struct rt_spi_device *rt_spi_device;
  18. struct rt_mutex lock;
  19. void *user_data;
  20. };
  21. int flash_init(void);
  22. #endif