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

Method send

modules/drivers/it8951/it8951.js:409–429  ·  view source on GitHub ↗
(src, offset, byteLength)

Source from the content-addressed store, hash-verified

407 this.#buffer.position = 0;
408 }
409 send(src, offset, byteLength) {
410 const filter = this.#filter, buffer = this.#buffer;
411 let position = buffer.position;
412
413 while (byteLength) {
414 let use = byteLength;
415 if (use > 1024 - position)
416 use = 1024 - position;
417
418 applyFilter(filter, src, offset, use, buffer, position);
419
420 byteLength -= use;
421 offset += use;
422 position += use;
423 if (1024 === position) {
424 this.#epd.spi.write(buffer);
425 position = 0;
426 }
427 }
428 buffer.position = position;
429 }
430 end() {
431 const epd = this.#epd;
432

Callers 1

pixelsout.jsFile · 0.45

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected