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

Function string_length

SerialFlashDirectory.cpp:229–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229static uint32_t string_length(uint32_t addr)
230{
231 char buf[16];
232 const char *p;
233 uint32_t len=0;
234
235 while (1) {
236 SerialFlash.read(addr, buf, sizeof(buf));
237 for (p=buf; p < buf + sizeof(buf); p++) {
238 len++;
239 if (*p == 0) return len;
240 }
241 addr += sizeof(buf);
242 }
243}
244
245// uint32_t signature = 0xFA96554C;
246// uint16_t maxfiles

Callers 1

createMethod · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected