SPI Single IO NOR Flash Library for Nucleo F767ZI Interfacing
Fork of W25X40BV by
Diff: S25FL256S.cpp
- Revision:
- 6:ef894010def4
- Parent:
- 4:8c463abb67d5
- Child:
- 7:690ac48a0b8c
- Child:
- 8:9f5a31575cdd
--- a/S25FL256S.cpp Mon May 21 07:50:39 2018 +0000 +++ b/S25FL256S.cpp Tue May 22 09:44:34 2018 +0000 @@ -216,7 +216,7 @@ long S25FL256S::raedLong(int addr) { //Read the 4 bytes from the eeprom memory. - writeEnable(); + chipEnable(); this->write(FOUR_READ); this->write((addr & ADDR_BMASK3) >> ADDR_BSHIFT3); @@ -228,7 +228,7 @@ long three = this->write(DUMMY_ADDR); long two = this->write(DUMMY_ADDR); long one = this->write(DUMMY_ADDR); - + chipDisable(); //Return the recomposed long by using bitshift. return ((four << 0) & 0xFF) + ((three << 8) & 0xFFFF) + ((two << 16) & 0xFFFFFF) + ((one << 24) & 0xFFFFFFFF); }