CRC

The Cyclic Redundancy Check (CRC) module is an API to access an MCUs integrated cyclic redundancy check hardware unit.

More information about accessing peripheral IO is in the Device Interface section.

Details

define CRC_VERSION

define CRC_IOC_IDENT_CHAR

define I_CRC_GETVERSION

define I_CRC_GETINFO

define I_CRC_SETATTR

define I_CRC_SETACTION

define I_CRC_GET

This request reads the value of the timer. For example:

crc_time_t current_time;
ioctl(crc_fd, I_CRC_GET, &current_time );

define I_CRC_TOTAL

enum crc_flag_t
  • CRC_FLAG_NONE
  • CRC_FLAG_ENABLE Enable the CRC
  • CRC_FLAG_DISABLE Disable the CRC
  • CRC_FLAG_IS_32BIT Use a 32-bit CRC
  • CRC_FLAG_IS_16BIT Use a 16-bit CRC
  • CRC_FLAG_IS_8BIT Use a 8-bit CRC
  • CRC_FLAG_IS_7BIT Use a 7-bit CRC
  • CRC_FLAG_IS_INVERT_OUTPUT Invert the output
  • CRC_FLAG_IS_DEFAULT_POLYNOMIAL Use the default polynomial
  • CRC_FLAG_IS_DEFAULT_INTIAL_VALUE Use the default initial value
  • CRC_FLAG_IS_INVERT_INPUT_8BIT Invert the input as bytes
  • CRC_FLAG_IS_INVERT_INPUT_16BIT Invert the input as 16-bit words
  • CRC_FLAG_IS_INVERT_INPUT_32BIT Invert the input as 32-bit words
  • CRC_FLAG_IS_INPUT_32BIT Input data is 32 bit words
  • CRC_FLAG_IS_INPUT_16BIT Input data is 16 bit words
  • CRC_FLAG_IS_INPUT_8BIT Input data is bytes

struct::crc_info_t

u32 o_flags

u32 o_events

u32 polynomial

u32 initial_value

u32 resd

struct::crc_attr_t

This data structure defines the structure used with I_CRC_SETATTR ioctl requests on the RTC. It is also used when opening the RTC.

u32 o_flags

Bitmask for setting attributes

u32 freq

Calibration frequency for setting the pre-scalar

u32 seed

u32 initial_value

u32 resd

X

Thanks for Coming!

Subscribe to news and updates