MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / waitBusy

Method waitBusy

modules/drivers/it8951/it8951.js:310–322  ·  view source on GitHub ↗
(timeout)

Source from the content-addressed store, hash-verified

308 this.select.write(1);
309 }
310 waitBusy(timeout) {
311 if (this.busy.read())
312 return;
313
314 if (!timeout)
315 timeout = 3000;
316
317 const start = Date.now();
318 while (!this.busy.read()) {
319 if ((Date.now() - start) > timeout)
320 throw new Error("time out");
321 }
322 }
323 readWords(result) {
324 this.waitBusy();
325 this.select.write(0);

Callers 5

writeArgsMethod · 0.95
writeCommandMethod · 0.95
writeRegisterMethod · 0.95
writeWordMethod · 0.95
readWordsMethod · 0.95

Calls 1

readMethod · 0.65

Tested by

no test coverage detected