summaryrefslogtreecommitdiff
path: root/atmel-samd
diff options
context:
space:
mode:
authorladyada <limor@ladyada.net>2018-01-30 01:24:28 -0500
committerladyada <limor@ladyada.net>2018-01-30 01:24:28 -0500
commit448d13e7b45a1edf4f290f800427db8a5890b814 (patch)
tree74ddc5d7f552ef2a82d497920f09c9ef53b8c81c /atmel-samd
parent544b9e4ba01acf1252d63444266e91bf17600b04 (diff)
memory type for alt flash fix
Diffstat (limited to 'atmel-samd')
-rw-r--r--atmel-samd/spi_flash.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/atmel-samd/spi_flash.c b/atmel-samd/spi_flash.c
index d74007a83..8b0030b6b 100644
--- a/atmel-samd/spi_flash.c
+++ b/atmel-samd/spi_flash.c
@@ -281,7 +281,11 @@ void spi_flash_init(void) {
|| response[1] == SPI_FLASH_JEDEC_MANUFACTURER_2
#endif
) &&
- response[2] == SPI_FLASH_JEDEC_MEMORY_TYPE &&
+ (response[2] == SPI_FLASH_JEDEC_MEMORY_TYPE
+ #ifdef SPI_FLASH_JEDEC_MANUFACTURER_2
+ || response[2] == SPI_FLASH_JEDEC_MEMORY_TYPE_2
+ #endif
+ ) &&
response[3] == SPI_FLASH_JEDEC_CAPACITY) {
spi_flash_is_initialised = true;
} else {