diff --git a/src/SPIFram.h b/src/SPIFram.h index ee900f8..cc3ac2b 100644 --- a/src/SPIFram.h +++ b/src/SPIFram.h @@ -336,12 +336,11 @@ template bool SPIFram::_read(uint32_t _addr, T& value, uint32_t _sz, b else { CHIP_SELECT if (fastRead) { - _nextByte(WRITE, FASTREAD); + _beginSPI(WRITE, FASTREAD); } else { - _nextByte(WRITE, READDATA); + _beginSPI(WRITE, READDATA); } - _transferAddress(); for (uint16_t i = 0; i < _sz; i++) { *p++ =_nextByte(READ); } diff --git a/src/SPIFramIO.cpp b/src/SPIFramIO.cpp index 859301c..fac927e 100644 --- a/src/SPIFramIO.cpp +++ b/src/SPIFramIO.cpp @@ -161,8 +161,8 @@ case FASTREAD: _nextByte(WRITE, opcode); - _nextByte(WRITE, DUMMYBYTE); _transferAddress(); + _nextByte(WRITE, DUMMYBYTE); break; default: