Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: Make fastread to work with FRAM chip #203

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/SPIFram.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,11 @@ template <class T> 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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/SPIFramIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@

case FASTREAD:
_nextByte(WRITE, opcode);
_nextByte(WRITE, DUMMYBYTE);
_transferAddress();
_nextByte(WRITE, DUMMYBYTE);
break;

default:
Expand Down