mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.1.9 Fletcher
This commit is contained in:
parent
66c685d652
commit
e09e9a6316
@ -6,13 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [0.1.7] - 2022-11-07
|
||||
- update GitHub actions
|
||||
- update license
|
||||
- add s1 and s2 parameters to the static functions.
|
||||
- update readme.md
|
||||
## [0.1.9] - 2023-10-30
|
||||
- update readme.md (badges)
|
||||
- fix changelog.md
|
||||
- minor edits
|
||||
|
||||
|
||||
## [0.1.8] - 2023-01-17
|
||||
- add parameters to static functions (#17)
|
||||
- fix unit test
|
||||
|
||||
## [0.1.7] - 2022-11-07
|
||||
- add changelog.md
|
||||
- add rp2040 to build-CI
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// FILE: Fletcher.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.8
|
||||
// VERSION: 0.1.9
|
||||
// DATE: 2022-01-25
|
||||
// PURPOSE: Arduino Library for calculating Fletcher's checksum
|
||||
// URL: https://github.com/RobTillaart/Fletcher
|
||||
@ -75,6 +75,6 @@ uint64_t fletcher64(uint32_t *data, uint16_t length, uint64_t s1, uint64_t s2)
|
||||
}
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
// -- END OF FILE --
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: Fletcher.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.8
|
||||
// VERSION: 0.1.9
|
||||
// DATE: 2022-01-25
|
||||
// PURPOSE: Arduino Library for calculating Fletcher's checksum
|
||||
// URL: https://github.com/RobTillaart/Fletcher
|
||||
@ -12,7 +12,7 @@
|
||||
#include "Arduino.h"
|
||||
|
||||
|
||||
#define FLETCHER_LIB_VERSION (F("0.1.8"))
|
||||
#define FLETCHER_LIB_VERSION (F("0.1.9"))
|
||||
|
||||
#define FLETCHER_16 255
|
||||
#define FLETCHER_32 65535UL
|
||||
|
@ -2,8 +2,11 @@
|
||||
[![Arduino CI](https://github.com/RobTillaart/FLETCHER/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
|
||||
[![Arduino-lint](https://github.com/RobTillaart/FLETCHER/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/FLETCHER/actions/workflows/arduino-lint.yml)
|
||||
[![JSON check](https://github.com/RobTillaart/FLETCHER/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/FLETCHER/actions/workflows/jsoncheck.yml)
|
||||
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/FLETCHER.svg)](https://github.com/RobTillaart/FLETCHER/issues)
|
||||
|
||||
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/FLETCHER/blob/master/LICENSE)
|
||||
[![GitHub release](https://img.shields.io/github/release/RobTillaart/FLETCHER.svg?maxAge=3600)](https://github.com/RobTillaart/FLETCHER/releases)
|
||||
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/FLETCHER.svg)](https://registry.platformio.org/libraries/robtillaart/FLETCHER)
|
||||
|
||||
|
||||
# FLETCHER
|
||||
@ -28,6 +31,7 @@ Tested on Arduino UNO + ESP32 + SAMD (See PR #7).
|
||||
|
||||
#### Related
|
||||
|
||||
- https://en.wikipedia.org/wiki/Fletcher%27s_checksum
|
||||
- https://github.com/RobTillaart/Adler
|
||||
- https://github.com/RobTillaart/CRC
|
||||
- https://github.com/RobTillaart/Fletcher
|
||||
@ -41,7 +45,9 @@ Tested on Arduino UNO + ESP32 + SAMD (See PR #7).
|
||||
|
||||
These interfaces are very similar for Fletcher16, Fletcher32 and Fletcher64 class.
|
||||
|
||||
Use **\#include "Fletcher16.h"**
|
||||
```cpp
|
||||
#include "Fletcher16.h"
|
||||
```
|
||||
|
||||
- **Fletcher16()** Constructor, initializes internals.
|
||||
- **void begin(uint8_t s1 = 0, uint8_t s2 = 0)** resets the internals.
|
||||
@ -62,7 +68,9 @@ in terms of the data type and optional pad it with zeros.
|
||||
|
||||
A string "abcdef" has length 2 for **fletcher64()** as it needs 2x4 bytes.
|
||||
|
||||
Use **\#include "Fletcher.h"**
|
||||
```cpp
|
||||
#include "Fletcher.h"
|
||||
```
|
||||
|
||||
- **uint16_t fletcher16(uint8_t \*data, uint16_t length, uint32_t s1 = 0, uint32_t s2 = 0)** length in units of 1 byte = 8 bits.
|
||||
- **uint32_t fletcher32(uint16_t \*data, uint16_t length, uint32_t s1 = 0, uint32_t s2 = 0)** length in units of 2 bytes = 16 bits.
|
||||
@ -119,14 +127,13 @@ See examples.
|
||||
- improve documentation
|
||||
- update performance figures.
|
||||
|
||||
|
||||
#### Should
|
||||
|
||||
- test other platforms
|
||||
- extend unit tests
|
||||
- start parameters static functions.
|
||||
- redo performance tests static functions after param addition.
|
||||
|
||||
- redo performance tests static functions after parameter addition.
|
||||
- create defines for MAGIC NRS (0.2.0).
|
||||
|
||||
#### Could
|
||||
|
||||
@ -137,7 +144,13 @@ See examples.
|
||||
- Stream ??
|
||||
- add getters for S1 and S2 in the classes
|
||||
|
||||
|
||||
#### Wont
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
If you appreciate my libraries, you can support the development and maintenance.
|
||||
Improve the quality of the libraries by providing issues and Pull Requests, or
|
||||
donate through PayPal or GitHub sponsors.
|
||||
|
||||
Thank you,
|
||||
|
@ -18,9 +18,9 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/Fletcher.git"
|
||||
},
|
||||
"version": "0.1.8",
|
||||
"version": "0.1.9",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
"headers": "Fletcher.h"
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=Fletcher
|
||||
version=0.1.8
|
||||
version=0.1.9
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence="Arduino Library for calculating Fletcher's checksum.
|
||||
|
Loading…
Reference in New Issue
Block a user