LibJuno
0.1.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
juno_binhex.c
Go to the documentation of this file.
1
#include "
juno/crc/crc.h
"
2
#include <stdint.h>
3
#include <stdio.h>
4
#include "
binhex.h
"
5
6
uint16_t
Juno_CrcBinhexUpdate
(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)&
M2_16
)^binhex_crctab[((crc>>8)&0xff)^*cp++];
14
}
15
16
return
(crc);
17
}
binhex.h
crc.h
M2_16
#define M2_16
Definition
crc.h:10
Juno_CrcBinhexUpdate
uint16_t Juno_CrcBinhexUpdate(uint16_t iCrc, const void *pcData, size_t zDataSize)
Definition
juno_binhex.c:6
src
crc
juno_binhex.c
Generated by
1.9.8