From fb5fb42d8a5dd0349ded23763ea081d13a6bd967 Mon Sep 17 00:00:00 2001 From: Nanosonde <2073569+nanosonde@users.noreply.github.com> Date: Wed, 15 Jul 2020 16:33:27 +0200 Subject: [PATCH] move comment --- src/knx/bits.cpp | 10 ++++++++++ src/knx/router_object_filtertable.cpp | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/knx/bits.cpp b/src/knx/bits.cpp index df2a986..a1e5941 100644 --- a/src/knx/bits.cpp +++ b/src/knx/bits.cpp @@ -107,6 +107,16 @@ uint64_t sixBytesToUInt64(uint8_t* data) return l; } +// The CRC of the Memory Control Block Table Property is a CRC16-CCITT with the following +// parameters: +// Width = 16 bit +// Truncated polynomial = 1021h +// Initial value = FFFFh +// Input date is NOT reflected. +// Output CRC is NOT reflected. +// No XOR is performed on the output CRC. +// EXAMPLE The correct CRC16-CCITT of the string ‘123456789’ is E5CCh. + uint16_t crc16Ccitt(uint8_t* input, uint16_t length) { uint32_t polynom = 0x1021; diff --git a/src/knx/router_object_filtertable.cpp b/src/knx/router_object_filtertable.cpp index 5b61c4e..274522a 100644 --- a/src/knx/router_object_filtertable.cpp +++ b/src/knx/router_object_filtertable.cpp @@ -126,16 +126,6 @@ void RouterObjectFilterTable::functionRouteTableControl(bool isCommand, uint8_t* // octet_address = GA_value div 8 // bit_position = GA_value mod 8 - // The CRC of the Memory Control Block Table Property is a CRC16-CCITT with the following - // parameters: - // Width = 16 bit - // Truncated polynomial = 1021h - // Initial value = FFFFh - // Input date is NOT reflected. - // Output CRC is NOT reflected. - // No XOR is performed on the output CRC. - // EXAMPLE The correct CRC16-CCITT of the string ‘123456789’ is E5CCh. - if (isCommand) { switch(srvId)