https://github.com/pilotak/checksum
Checksum library for mbed
https://github.com/pilotak/checksum
Last synced: 9 months ago
JSON representation
Checksum library for mbed
- Host: GitHub
- URL: https://github.com/pilotak/checksum
- Owner: pilotak
- License: mit
- Created: 2018-03-14T11:26:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-13T10:11:15.000Z (over 3 years ago)
- Last Synced: 2025-06-30T11:03:48.797Z (12 months ago)
- Language: C++
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Checksum
Checksum library for mbed
```cpp
#include "mbed.h"
#include "Checksum.h"
Checksum checksum;
int main() {
uint8_t data[10];
memset(data, 0xFF, sizeof(data)); // fill up with some data
data[0] = 0;
printf("xor: %u, maxim_crc8: %u, modbus_crc16: %u\n",
checksum.get_xor(data, sizeof(data)),
checksum.get_maxim(data, sizeof(data)),
checksum.get_modbus(data, sizeof(data)));
while (true);
}
```