This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stddef.h> | |
uint16_t crc16_mcrf4xx(uint16_t crc, uint8_t *data, size_t len) | |
{ | |
if (!data || len < 0) | |
return crc; | |
while (len--) { | |
crc ^= *data++; |