|
|
@ -127,8 +127,8 @@ void
|
|
|
|
req_finalize(struct Client* client, uint8_t cmdset, uint8_t cmdid, uint8_t hostbyte, bool need_ack, size_t length, union Request* req) {
|
|
|
|
req_finalize(struct Client* client, uint8_t cmdset, uint8_t cmdid, uint8_t hostbyte, bool need_ack, size_t length, union Request* req) {
|
|
|
|
|
|
|
|
|
|
|
|
req->header.preamble = 0x55;
|
|
|
|
req->header.preamble = 0x55;
|
|
|
|
req->header.length_l = length & 0xFF;
|
|
|
|
//req->header.length = length & 0x1FFF | 0x400;
|
|
|
|
req->header.length_h = ((length >> 8) & 0x3) | 4;
|
|
|
|
req->header.length = length;
|
|
|
|
req->header.crc = crc8(req, 3);
|
|
|
|
req->header.crc = crc8(req, 3);
|
|
|
|
req->header.seq_id = client->seq++;
|
|
|
|
req->header.seq_id = client->seq++;
|
|
|
|
req->header.sender = client->hostbyte;
|
|
|
|
req->header.sender = client->hostbyte;
|
|
|
|