0.3.2 CRC

This commit is contained in:
rob tillaart 2022-10-30 20:33:14 +01:00
parent d911271e82
commit 8f4299c531
7 changed files with 79 additions and 20 deletions

View File

@ -1,3 +1,18 @@
platforms:
rpipico:
board: rp2040:rp2040:rpipico
package: rp2040:rp2040
gcc:
features:
defines:
- ARDUINO_ARCH_RP2040
warnings:
flags:
packages:
rp2040:rp2040:
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
compile:
# Choosing to run compilation tests on 2 different Arduino platforms
platforms:
@ -9,5 +24,6 @@ compile:
- esp32
# - esp8266
# - mega2560
- rpipico
libraries:
- "printHelpers"

View File

@ -1,7 +1,7 @@
//
// FILE: CRC.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.3.0
// VERSION: 0.3.2
// PURPOSE: Arduino library for CRC8, CRC12, CRC16, CRC16-CCITT, CRC32, CRC64
// URL: https://github.com/RobTillaart/CRC
//

View File

@ -2,7 +2,7 @@
//
// FILE: CRC.h
// AUTHOR: Rob Tillaart
// VERSION: 0.3.0
// VERSION: 0.3.2
// PURPOSE: Arduino library for CRC8, CRC12, CRC16, CRC16-CCITT, CRC32, CRC64
// URL: https://github.com/RobTillaart/CRC
//
@ -12,7 +12,7 @@
#include "CRC_polynomes.h"
#define CRC_LIB_VERSION (F("0.3.0"))
#define CRC_LIB_VERSION (F("0.3.2"))
////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,46 @@
//
// FILE: CRC_test.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// DATE: 2020
// (c) : MIT
//
#include "CRC.h"
#include "printHelpers.h" // for the 64 bit...
char str[24] = "123456789";
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
uint8_t * data = (uint8_t *) &str[0];
Serial.println("Verified with - https://crccalc.com/ \n");
Serial.print("TEST:\t");
Serial.println(str);
Serial.print("CRC8:\t");
Serial.println(crc8(data, 9, 0x07, 0x00, 0x00, false, false), HEX);
Serial.print("CRC16:\t");
Serial.println(crc16(data, 9, 0x1021, 0x0000, 0x0000, false, false ), HEX);
Serial.print("CRC32:\t");
Serial.println(crc32(data, 9, 0x04C11DB7, 0x00000000, 0x00000000, false, false), HEX);
// Serial.print("*CRC64:\t");
// uint64_t t = crc64(data, 9, 0x814141AB, 0x00000000, 0x00000000, false, false);
// Serial.println(print64(t, HEX));
Serial.println("\n\nDone...");
}
void loop()
{
}
// -- END OF FILE --

View File

@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/CRC"
},
"version": "0.3.1",
"version": "0.3.2",
"license": "MIT",
"frameworks": "arduino",
"platforms": "*",

View File

@ -1,5 +1,5 @@
name=CRC
version=0.3.1
version=0.3.2
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Library for CRC for Arduino

View File

@ -1,8 +1,13 @@
# Release Notes
## 0.3.1 2022-05-20
## 0.3.2 - 2022-10-30
- add RP2040 to build-CI
- fix version numbers
## 0.3.1 - 2022-05-20
- added constructors with all parameters.
CRC16(uint16_t polynome, uint16_t XORstart, uint16_t XORend, bool reverseIn, bool reverseOut);
All five parameters are mandatory, no defaults in this first release.
@ -10,25 +15,19 @@
- remove #ifndef Header guards as these are not needed.
- update documentation
## 0.3.0 2022-04-15
## 0.3.0 - 2022-04-15
- split CRC.h in CRC.h and CRC.cpp to fix #21 (again)
- remove #ifndef Header guards as these are not needed.
----
## 0.2.3 2022-04-13
## 0.2.3 - 2022-04-13
- replace #pragma once with #ifndef Header guards #21
## 0.2.2
- fix #19 enable/disable yield call
## 0.2.1
- fix #17 yield() count in **add(array, length)**
(kudo's to dlsloan)
- added defaults for CRC64 static function.
@ -37,22 +36,20 @@
- added conditional yield().
- added CRC_polynomes.h
## 0.2.0
- added getters for parameters
- made yield conditional in **add(array, length)**
- improved examples
- added releaseNotes.md
----
## 0.1.6
- add CRC12 function
- add CRC12 class
## 0.1.5
- TODO (just as older versions)
That's all folks!