quec_spi_nor_flash_prop.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /** @file
  2. quec_spi_nor_flash_prop.h
  3. @brief
  4. This file is used to define spi NOR FLASH api for open Quectel Project.
  5. */
  6. /*================================================================
  7. Copyright (c) 2020 Quectel Wireless Solution, Co., Ltd. All Rights Reserved.
  8. Quectel Wireless Solution Proprietary and Confidential.
  9. =================================================================*/
  10. /*=================================================================
  11. EDIT HISTORY FOR MODULE
  12. This section contains comments describing changes made to the module.
  13. Notice that changes are listed in reverse chronological order.
  14. WHEN WHO WHAT, WHERE, WHY
  15. ------------ ------- -------------------------------------------------------------------------------
  16. =================================================================*/
  17. #include <stdio.h>
  18. #include <string.h>
  19. #include <stdlib.h>
  20. #include "ql_osi_def.h"
  21. #include "ql_api_osi.h"
  22. typedef enum
  23. {
  24. QUEC_NOR_FLASH_MODE_8BIT = 0, //8bit status register 8位的状态寄存器
  25. QUEC_NOR_FLASH_MODE_16BIT, //16bi status register 16位的状态寄存器
  26. }quec_spi_nor_flash_status_mode_e;
  27. typedef struct
  28. {
  29. unsigned int mid; //Product ID, the 3-byte product ID read with 9F 产品ID,用9F读到的3字节产品ID
  30. int64 capacity; //flash capacity, 32Mbit:0x400000 64Mbit:0x800000 128Mbit:0x1000000
  31. quec_spi_nor_flash_status_mode_e mode; //FLASH mode
  32. unsigned int mount_start_addr; //flash start addr to mount the file system,0x000000
  33. int32 mount_size; //the amount of space used to mount the file system,(0x000000---mount szie)
  34. uint32_t pb_size; //flash pb block size, general use 0x200,in special cases,use 0x400 to exchange space for time
  35. }quec_spi_nor_flash_info_s;