MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / command

Method command

tools/xsbug/esptool.js:806–818  ·  view source on GitHub ↗
(opcode, payload = new Uint8Array, checksum = 0)

Source from the content-addressed store, hash-verified

804 return result;
805 }
806 async command(opcode, payload = new Uint8Array, checksum = 0) {
807 const cmd = new Uint8Array(8 + payload.byteLength);
808 cmd[0] = 0; // request
809 cmd[1] = opcode;
810 cmd[2] = payload.byteLength & 255;
811 cmd[3] = (payload.byteLength >> 8) & 255;
812 cmd[4] = checksum & 255;
813 cmd[5] = (checksum >> 8) & 255;
814 cmd[6] = (checksum >> 16) & 255;
815 cmd[7] = (checksum >> 24) & 255;
816 cmd.set(new Uint8Array(payload), 8);
817 this.writeSLIP(cmd.buffer);
818 }
819}
820Object.freeze(EspTool.prototype);
821

Callers 7

eraseMethod · 0.95
readPartMethod · 0.95
beginProgrammingMethod · 0.95
downloadToMemoryMethod · 0.95
readRegisterMethod · 0.95
changeBaudMethod · 0.95
downloadToFlashMethod · 0.95

Calls 2

writeSLIPMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected