Searched refs:cksum (Results 1 – 2 of 2) sorted by relevance
64 uint8_t cksum = 0; in sendCommand() local78 cksum += len; in sendCommand()82 cksum += cmd; in sendCommand()90 cksum += (uint8_t)data[i]; in sendCommand()95 command.push_back(cksum); in sendCommand()141 cksum = 0; in sendCommand()143 cksum += (uint8_t)resp[i]; in sendCommand()145 if (cksum != (uint8_t)resp[resp.size() - 1]) in sendCommand()148 << int(cksum) << ", got " << (uint8_t)resp[resp.size()-1] << endl; in sendCommand()
205 uint16_t cksum = rPkt[7] + rPkt[8] + PKT_COMMAND; in writeCmdPacket() local211 cksum += rPkt[j]; in writeCmdPacket()215 rPkt[j++] = (cksum >> 8) & 0xff; // store the cksum in writeCmdPacket()216 rPkt[j++] = cksum & 0xff; in writeCmdPacket()