Fix. Crc types changes.
This commit is contained in:
+7
-6
@@ -47,18 +47,19 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
// ================= 16-BIT CRC ===================
|
||||
|
||||
class FastCRC16 {
|
||||
public:
|
||||
FastCRC16(uint16_t seed);
|
||||
FastCRC16(quint16 seed);
|
||||
|
||||
// change function name from mcrf4xx_upd to mcrf4xx
|
||||
uint16_t mcrf4xx_calc(const uint8_t *data,const uint16_t datalen); // Equivalent to _crc_ccitt_update() in crc16.h from avr_libc
|
||||
quint16 mcrf4xx_calc(const quint8 *data,const quint16 datalen); // Equivalent to _crc_ccitt_update() in crc16.h from avr_libc
|
||||
|
||||
private:
|
||||
uint16_t seed_;
|
||||
quint16 seed_;
|
||||
|
||||
};
|
||||
|
||||
@@ -66,13 +67,13 @@ private:
|
||||
|
||||
class FastCRC32 {
|
||||
public:
|
||||
FastCRC32(uint32_t seed);
|
||||
FastCRC32(quint32 seed);
|
||||
|
||||
// change function name from crc32_upd to crc32
|
||||
uint32_t crc32_calc(const uint8_t *data, uint16_t len); // Call for subsequent calculations with previous seed
|
||||
quint32 crc32_calc(const quint8 *data, quint16 len); // Call for subsequent calculations with previous seed
|
||||
|
||||
private:
|
||||
uint32_t seed_;
|
||||
quint32 seed_;
|
||||
};
|
||||
|
||||
#endif // FASTCRC_FASTCRC_H_
|
||||
|
||||
Reference in New Issue
Block a user