mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-09 15:06:37 +02:00
license included
tried to increase stability
This commit is contained in:
parent
e05d2220cb
commit
c61d9568ba
20 changed files with 113 additions and 44 deletions
|
@ -1,16 +1,20 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 2022 Ahoy, https://www.mikrocontroller.net/topic/525778
|
||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __CRC_H__
|
||||
#define __CRC_H__
|
||||
|
||||
#include <cstdint>
|
||||
#include "Arduino.h"
|
||||
|
||||
#define CRC8_INIT 0x00
|
||||
#define CRC8_POLY 0x01
|
||||
|
||||
#define CRC16_MODBUS_POLYNOM 0xA001
|
||||
#define CRC16_NRF24_POLYNOM 0x1021
|
||||
|
||||
uint8_t crc8(uint8_t buf[], uint8_t len);
|
||||
uint16_t crc16(uint8_t buf[], uint8_t len, uint16_t start = 0xffff);
|
||||
uint16_t crc16nrf24(uint8_t buf[], uint16_t lenBits, uint16_t startBit = 0, uint16_t crcIn = 0xffff);
|
||||
|
||||
#endif /*__CRC_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue