From 8f0905197f7cead299c00006ada482095fe9d1a4 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 21 Dec 2014 18:25:06 +0100 Subject: allow buffer sizes that are not multiples of 4 in crc calculation --- daemon/stm32crc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'daemon/stm32crc.h') diff --git a/daemon/stm32crc.h b/daemon/stm32crc.h index 1361de3..b21f5ed 100644 --- a/daemon/stm32crc.h +++ b/daemon/stm32crc.h @@ -10,8 +10,6 @@ public: void reset(); - // Data size must be multiple of 4, data must be aligned to 4. - void addData(const char *data, int length); void addData(const QByteArray &data); @@ -19,6 +17,8 @@ public: private: quint32 crc; + quint8 buffer[4]; + quint8 rem; }; #endif // STM32CRC_H -- cgit v1.2.3