(data, start = 0, end = data.length)
| 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 |
no outgoing calls
no test coverage detected