|
Functions |
| const char _ID_[] | __attribute__ ((unused))="$Id: packet.c,v 1.2 2004/07/07 22:07:12 alpha Exp $" |
| unsigned char | crc8 (unsigned char reg, unsigned char data) |
| | Calculate an 8 bit CRC.
|
| unsigned char | compute_crc (unsigned char *bytes, int length) |
| | Calculate CRC for data buffer.
|
| int | otto_crc_calc (union otto_packet *pkt) |
| | Calculate CRC for a packet.
|
| int | otto_crc_valid (union otto_packet *pkt) |
| | Validate CRC for a packet.
|
| int | otto_findpacket (union otto_packet *pkt, int *start, int *len) |
| | Find a valid packet within a packet buffer.
|
Variables |
| const unsigned char | CRC_INIT = 0xff |
| const unsigned char | CRC_POLY = 0x1c |
| const unsigned char | CRC_VALID = 0xc4 |
See SAE J1850, 7.4.1 (HS-3000, pp. 212-213) for checksum description.