summaryrefslogtreecommitdiff
path: root/stacks/max25-bcpr/include/bcpr/bcpr_crc.h
blob: 5a53b159d8042b37957d321f15203e93f322afb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef BCPR_CRC_H
#define BCPR_CRC_H

#include <stddef.h>
#include <stdint.h>

/* CRC-CCITT as used by Linux hdlcdrv (good frame residue 0xf0b8). */
uint16_t bcpr_crc_ccitt(uint16_t crc, const uint8_t *buf, size_t len);
void bcpr_append_crc_ccitt(uint8_t *buffer, int len);
int bcpr_check_crc_ccitt(const uint8_t *buf, int cnt);

#endif
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com