From 80dd7310cc2a227630a6435a6009d065f42947ee Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Mon, 12 Nov 2018 13:16:23 +0100 Subject: [PATCH] Update comments in spislave.cpp --- src/spislave.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spislave.cpp b/src/spislave.cpp index b4f93c4d..f2b14baa 100644 --- a/src/spislave.cpp +++ b/src/spislave.cpp @@ -60,13 +60,13 @@ void spi_slave_task(void *param) { continue; } - // fill tx buffer with data to send from queue and calculate crc16 cheksum + // fill tx buffer with data to send from queue uint8_t *messageType = txbuf + 2; *messageType = msg.MessagePort; uint8_t *messageSize = txbuf + 3; *messageSize = msg.MessageSize; memcpy(txbuf + HEADER_SIZE, &msg.Message, msg.MessageSize); - // calculate crc16 checksum + // calculate crc16 checksum over txbuf and insert checksum at pos 0+1 of txbuf uint16_t *crc = (uint16_t *)txbuf; *crc = crc16_be(0, messageType, msg.MessageSize + HEADER_SIZE - 2); @@ -173,4 +173,4 @@ void spi_housekeeping(void) { #ifdef HAS_SPI ESP_LOGD(TAG, "spiloop %d bytes left", uxTaskGetStackHighWaterMark(spiTask)); #endif -} \ No newline at end of file +}