summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorSchumyHao <[email protected]>2015-04-16 21:06:54 +0800
committerSchumyHao <[email protected]>2015-04-16 21:06:54 +0800
commit7d341d4e6ecf54f7b4cfb25466a8a13ec024037f (patch)
treec009fb2e39c4ff5048a7cf4c8b293c0d8131c5d3 /components
parent5620a10628ff49bebf500f720572c3af1abf8870 (diff)
add w25q80 support to spi flash
Diffstat (limited to 'components')
-rw-r--r--components/drivers/spi/spi_flash_w25qxx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/drivers/spi/spi_flash_w25qxx.c b/components/drivers/spi/spi_flash_w25qxx.c
index bdcdbd83c1..2de71e3498 100644
--- a/components/drivers/spi/spi_flash_w25qxx.c
+++ b/components/drivers/spi/spi_flash_w25qxx.c
@@ -31,6 +31,7 @@
/* JEDEC Manufacturer��s ID */
#define MF_ID (0xEF)
/* JEDEC Device ID: Memory type and Capacity */
+#define MTC_W25Q80_BV (0x4014) /* W25Q80BV */
#define MTC_W25Q16_BV_CL_CV (0x4015) /* W25Q16BV W25Q16CL W25Q16CV */
#define MTC_W25Q16_DW (0x6015) /* W25Q16DW */
#define MTC_W25Q32_BV (0x4016) /* W25Q32BV */
@@ -346,6 +347,11 @@ rt_err_t w25qxx_init(const char * flash_device_name, const char * spi_device_nam
FLASH_TRACE("W25Q16DW detection\r\n");
spi_flash_device.geometry.sector_count = 512;
}
+ else if(memory_type_capacity == MTC_W25Q80_BV)
+ {
+ FLASH_TRACE("W25Q80BV detection\r\n");
+ spi_flash_device.geometry.sector_count = 256;
+ }
else
{
FLASH_TRACE("Memory Capacity error!\r\n");