Skip to content
This repository has been archived by the owner on Sep 2, 2019. It is now read-only.

Commit

Permalink
DM: add x25Q64 filesystem info and make GD25Q work with all size vari…
Browse files Browse the repository at this point in the history
…ants
  • Loading branch information
deanm1278 committed Oct 11, 2018
1 parent d47f147 commit 1d43acb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Adafruit_QSPI_GD25Q.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bool Adafruit_QSPI_GD25Q::begin()
// read device ids
uint8_t ids[3];
QSPI0.runInstruction(&cmdSetGD25Q[GD25Q_READ_IDS], 0, NULL, ids, 3);
if (ids[0] != 0xC8 || ids[2] != 0x15 )
if (ids[0] != 0xC8)
return false;

_status.reg = 0;
Expand Down
5 changes: 5 additions & 0 deletions Adafruit_QSPI_Generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ bool Adafruit_QSPI_Generic::setFlashType(spiflash_type_t t){
addrsize = 24;
pages = 4096;
totalsize = pages * pagesize; // 1 MBytes
} else if (type == SPIFLASHTYPE_W25Q64) {
pagesize = 256;
addrsize = 24;
pages = 32768;
totalsize = pages * pagesize; // 8 MBytes
}
else {
pagesize = 0;
Expand Down

0 comments on commit 1d43acb

Please sign in to comment.