MCPcopy Create free account
hub / github.com/LowPowerLab/SPIFlash / readByte

Method readByte

SPIFlash.cpp:150–158  ·  view source on GitHub ↗

read 1 byte from flash memory

Source from the content-addressed store, hash-verified

148
149/// read 1 byte from flash memory
150uint8_t SPIFlash::readByte(uint32_t addr) {
151 command(SPIFLASH_ARRAYREADLOWFREQ);
152 SPI.transfer(addr >> 16);
153 SPI.transfer(addr >> 8);
154 SPI.transfer(addr);
155 uint8_t result = SPI.transfer(0);
156 unselect();
157 return result;
158}
159
160/// read unlimited # of bytes
161void SPIFlash::readBytes(uint32_t addr, void* buf, uint16_t len) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected