CRC32 Support

File: csp/csp_crc32.h

Description: CRC32 support.

Interface Functions

int csp_crc32_append(csp_packet_t *packet)
[source]

Append CRC32 checksum to packet

Parameters:
  • packet – CSP packet, must be valid.

Returns:

#CSP_ERR_NONE on success, otherwise an error code.

int csp_crc32_verify(csp_packet_t *packet)
[source]

Verify CRC32 checksum on packet.

Parameters:
  • packet – CSP packet, must be valid.

Returns:

#CSP_ERR_NONE on success, otherwise an error code.

uint32_t csp_crc32_memory(const uint8_t *addr, uint32_t length)
[source]

Calculate checksum for a given memory area.

Parameters:
  • addr – memory address

  • length – length of memory to do checksum on

Returns:

checksum