LibJuno
0.1.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
juno_arc.c
Go to the documentation of this file.
1
#include "
juno/crc/crc.h
"
2
#include <stdint.h>
3
#include <stdio.h>
4
#include "
arc.h
"
5
6
uint16_t
Juno_CrcArcUpdate
(uint16_t iCrc,
const
void
*pcData,
size_t
zDataSize)
7
{
8
register
uint16_t crc = iCrc;
9
register
const
uint8_t *cp = pcData;
10
register
size_t
cnt = zDataSize;
11
12
while
(cnt--) {
13
crc=((crc>>8)&
M1_16
)^arc_crctab[(crc&0xff)^*cp++];
14
}
15
16
return
(crc);
17
}
arc.h
crc.h
M1_16
#define M1_16
Definition
crc.h:9
Juno_CrcArcUpdate
uint16_t Juno_CrcArcUpdate(uint16_t iCrc, const void *pcData, size_t zDataSize)
Definition
juno_arc.c:6
src
crc
juno_arc.c
Generated by
1.9.8