![]() |
RZV Flexible Software Package Documentation
Release v2.0.0
|
|
Interface for cyclic redundancy checking.
The CRC (Cyclic Redundancy Check) calculator generates CRC codes using five different polynomials including 8 bit, 16 bit, and 32 bit variations. Calculation can be performed by sending data to the block using the CPU or by snooping on read or write activity on one of SCI channels.
Implemented by:
Data Structures | |
struct | crc_input_t |
struct | crc_cfg_t |
struct | crc_api_t |
struct | crc_instance_t |
Typedefs | |
typedef void | crc_ctrl_t |
Enumerations | |
enum | crc_polynomial_t |
enum | crc_bit_order_t |
enum | crc_snoop_direction_t |
struct crc_input_t |
Structure for CRC inputs
struct crc_cfg_t |
User configuration structure, used in open function
Data Fields | ||
---|---|---|
uint8_t | channel | Channel number. |
crc_polynomial_t | polynomial | CRC Generating Polynomial Switching (GPS) |
crc_bit_order_t | bit_order | CRC Calculation Switching (LMS) |
uint32_t | snoop_address | Register Snoop Address (CRCSA) |
void const * | p_extend | CRC Hardware Dependent Configuration. |
struct crc_api_t |
CRC driver structure. General CRC functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(crc_ctrl_t *const p_ctrl, crc_cfg_t const *const p_cfg) |
fsp_err_t(* | close )(crc_ctrl_t *const p_ctrl) |
fsp_err_t(* | crcResultGet )(crc_ctrl_t *const p_ctrl, uint32_t *crc_result) |
fsp_err_t(* | snoopEnable )(crc_ctrl_t *const p_ctrl, uint32_t crc_seed) |
fsp_err_t(* | snoopDisable )(crc_ctrl_t *const p_ctrl) |
fsp_err_t(* | calculate )(crc_ctrl_t *const p_ctrl, crc_input_t *const p_crc_input, uint32_t *p_crc_result) |
fsp_err_t(* crc_api_t::open) (crc_ctrl_t *const p_ctrl, crc_cfg_t const *const p_cfg) |
Open the CRC driver module.
[in] | p_ctrl | Pointer to CRC device handle. |
[in] | p_cfg | Pointer to a configuration structure. |
fsp_err_t(* crc_api_t::close) (crc_ctrl_t *const p_ctrl) |
Close the CRC module driver
[in] | p_ctrl | Pointer to CRC device handle |
FSP_SUCCESS | Configuration was successful. |
fsp_err_t(* crc_api_t::crcResultGet) (crc_ctrl_t *const p_ctrl, uint32_t *crc_result) |
Return the current calculated value.
[in] | p_ctrl | Pointer to CRC device handle. |
[out] | crc_result | The calculated value from the last CRC calculation. |
fsp_err_t(* crc_api_t::snoopEnable) (crc_ctrl_t *const p_ctrl, uint32_t crc_seed) |
Configure and Enable snooping.
[in] | p_ctrl | Pointer to CRC device handle. |
[in] | crc_seed | CRC seed. |
fsp_err_t(* crc_api_t::snoopDisable) (crc_ctrl_t *const p_ctrl) |
Disable snooping.
[in] | p_ctrl | Pointer to CRC device handle. |
fsp_err_t(* crc_api_t::calculate) (crc_ctrl_t *const p_ctrl, crc_input_t *const p_crc_input, uint32_t *p_crc_result) |
Perform a CRC calculation on a block of data.
[in] | p_ctrl | Pointer to CRC device handle. |
[in] | p_crc_input | A pointer to structure for CRC inputs |
[out] | crc_result | The calculated value of the CRC calculation. |
struct crc_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
crc_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
crc_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
crc_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void crc_ctrl_t |
CRC control block. Allocate an instance specific control block to pass into the CRC API calls.
enum crc_polynomial_t |
CRC Generating Polynomial Switching (GPS).
enum crc_bit_order_t |