spi_slave: re-enable checksum for payload
Signed-off-by: Christian Ambach <christian.ambach@deutschebahn.com>
This commit is contained in:
parent
18b44f2208
commit
3cd43710e6
@ -66,9 +66,9 @@ void spi_slave_task(void *param) {
|
|||||||
uint8_t *messageSize = txbuf + 3;
|
uint8_t *messageSize = txbuf + 3;
|
||||||
*messageSize = msg.MessageSize;
|
*messageSize = msg.MessageSize;
|
||||||
memcpy(txbuf + HEADER_SIZE, &msg.Message, msg.MessageSize);
|
memcpy(txbuf + HEADER_SIZE, &msg.Message, msg.MessageSize);
|
||||||
// calculate crc16 checksum, not used yet
|
// calculate crc16 checksum
|
||||||
// uint16_t *crc = (uint16_t *)txbuf;
|
uint16_t *crc = (uint16_t *)txbuf;
|
||||||
//*crc = crc16_be(0, messageType, msg.MessageSize + HEADER_SIZE - 2);
|
*crc = crc16_be(0, messageType, msg.MessageSize + HEADER_SIZE - 2);
|
||||||
|
|
||||||
// set length for spi slave driver
|
// set length for spi slave driver
|
||||||
transaction_size = HEADER_SIZE + msg.MessageSize;
|
transaction_size = HEADER_SIZE + msg.MessageSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user