File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,13 +257,14 @@ uint32_t SPIFlash::getID(void) {
257257// 1. page --> Any page number from 0 to 4095
258258// 2. offset --> Any offset within the page - from 0 to 255
259259uint8_t SPIFlash::readByte (uint16_t page_number, uint8_t offset) {
260- if (!_notBusy () || page_number >= 4096 || offset >= 256 ) {
261- uint32_t address = _getAddress (page_number, offset);
262- _beginRead (address);
263- uint8_t var = _readNextByte ();
264- _endProcess ();
265- return var;
266- }
260+ if (!_notBusy () || page_number >= 4096 || offset >= 256 )
261+ return false ;
262+
263+ uint32_t address = _getAddress (page_number, offset);
264+ _beginRead (address);
265+ uint8_t var = _readNextByte ();
266+ _endProcess ();
267+ return var;
267268}
268269
269270// Reads an array of bytes starting from a specific location in a page. Takes three arguments -
You can’t perform that action at this time.
0 commit comments