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

Method espChecksum

tools/xsbug/esptool.js:800–805  ·  view source on GitHub ↗
(data, start = 0, end = data.length)

Source from the content-addressed store, hash-verified

798 reply = this.parseReply(reply, Bootloader.FLASH_END + cmdOffset);
799 }
800 espChecksum(data, start = 0, end = data.length) { // simple checksum used by ESP ROMs on data segments
801 let result = 0xef;
802 for (let i = start; i < end; i++)
803 result ^= data[i];
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

Callers 2

downloadToMemoryMethod · 0.95
downloadToFlashMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected