Skip to content

Instantly share code, notes, and snippets.

View aurelj's full-sized avatar

Aurélien Jacobs aurelj

View GitHub Profile
@aurelj
aurelj / crc16_mcrf4xx.c
Created July 6, 2014 16:36
Simple CRC-16-MCRF4XX C implementation.
#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++;