|
PebbleOS
|
Hardware CRC acceleration used by CRC. More...
Functions | |
| size_t | pbl_crc_hw_crc32 (uint32_t *crc, const void *data, size_t len) |
| Accelerated CRC-32/ISO-HDLC. | |
| size_t | pbl_crc_hw_crc32_legacy (uint32_t *reg, const void *data, size_t len) |
| Accelerated legacy checksum. | |
Hardware CRC acceleration used by CRC.
Provided by drivers that select CRC_HW_ACCEL.
Each function processes a prefix of the data, a whole number of 32-bit words, and returns its length in bytes. It returns 0 without touching the running value when the hardware cannot take the request; the CRC subsystem computes whatever is left in software.
| size_t pbl_crc_hw_crc32 | ( | uint32_t * | crc, |
| const void * | data, | ||
| size_t | len | ||
| ) |
Accelerated CRC-32/ISO-HDLC.
| [in,out] | crc | Running CRC-32/ISO-HDLC value, as passed to pbl_crc32(). |
| data | Data to process. | |
| len | Length of data in bytes. |
| size_t pbl_crc_hw_crc32_legacy | ( | uint32_t * | reg, |
| const void * | data, | ||
| size_t | len | ||
| ) |
Accelerated legacy checksum.
| [in,out] | reg | Running legacy checksum register, see struct pbl_crc32_legacy. |
| data | Data to process, as little-endian 32-bit words. | |
| len | Length of data in bytes. |