MCPcopy Create free account
hub / github.com/PaulStoffregen/SerialFlash / read

Method read

SerialFlash.h:85–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 return false;
84 }
85 uint32_t read(void *buf, uint32_t rdlen) {
86 if (offset + rdlen > length) {
87 if (offset >= length) return 0;
88 rdlen = length - offset;
89 }
90 SerialFlash.read(address + offset, buf, rdlen);
91 offset += rdlen;
92 return rdlen;
93 }
94 uint32_t write(const void *buf, uint32_t wrlen) {
95 if (offset + wrlen > length) {
96 if (offset >= length) return 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected