From 7e0825a40d8b67899855b75a1e4cb8b04877dad9 Mon Sep 17 00:00:00 2001 From: Prajwal Bhattaram Date: Sun, 2 Jun 2019 17:41:18 +1000 Subject: [PATCH] Fixed bug that prevented FastRead from working as it was meant to. Resolves #173 --- src/SPIFlashIO.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/SPIFlashIO.cpp b/src/SPIFlashIO.cpp index e1f47c1..bb2f4af 100644 --- a/src/SPIFlashIO.cpp +++ b/src/SPIFlashIO.cpp @@ -202,8 +202,8 @@ case FASTREAD: _nextByte(WRITE, opcode); - _nextByte(WRITE, DUMMYBYTE); _transferAddress(); + _nextByte(WRITE, DUMMYBYTE); break; case SECTORERASE: @@ -576,7 +576,7 @@ else { if (_chip.sfdpAvailable) { #ifdef RUNDIAGNOSTIC - Serial.println("SFDP ID finished."); + Serial.println(F("SFDP ID finished.")); #endif return true; } @@ -588,7 +588,9 @@ } if (!_chip.capacity) { - + #ifdef RUNDIAGNOSTIC + Serial.println(F("Chip capacity cannot be identified")); + #endif if (flashChipSize) { // If a custom chip size is defined #ifdef RUNDIAGNOSTIC