Skip to content

Commit

Permalink
Fixes #102
Browse files Browse the repository at this point in the history
  • Loading branch information
Marzogh committed Dec 10, 2017
1 parent 657ad27 commit 7799639
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/SPIFlash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ bool SPIFlash::writeByteArray(uint32_t _addr, uint8_t *data_buffer, size_t buffe
CHIP_SELECT
_nextByte(WRITE, PAGEPROG);
_transferAddress();
_nextBuf(PAGEPROG, &data_buffer[0], bufferSize);
//_nextBuf(PAGEPROG, &data_buffer[0], bufferSize);
for (uint16_t i = 0; i < bufferSize; ++i) {
_nextByte(WRITE, data_buffer[i]);
}
CHIP_DESELECT
}
else {
Expand Down Expand Up @@ -551,7 +554,10 @@ bool SPIFlash::writeCharArray(uint32_t _addr, char *data_buffer, size_t bufferSi
CHIP_SELECT
_nextByte(WRITE, PAGEPROG);
_transferAddress();
_nextBuf(PAGEPROG, (uint8_t*) &data_buffer[0], bufferSize);
//_nextBuf(PAGEPROG, (uint8_t*) &data_buffer[0], bufferSize);
for (uint16_t i = 0; i < bufferSize; ++i) {
_nextByte(WRITE, data_buffer[i]);
}
CHIP_DESELECT
}
else {
Expand Down

0 comments on commit 7799639

Please sign in to comment.