![]() |
![]() |
MSPM0C110X Driver Library
2.05.00.05
|
Cyclic Redundancy Check (CRC) Driver Library.
#include <stdbool.h>
#include <stdint.h>
#include <ti/devices/msp/msp.h>
#include <ti/driverlib/dl_common.h>
Go to the source code of this file.
Enumerations | |
enum | DL_CRC_POLYNOMIAL { DL_CRC_16_POLYNOMIAL = CRC_CRCCTRL_POLYSIZE_CRC16 } |
enum | DL_CRC_BIT { DL_CRC_BIT_REVERSED = CRC_CRCCTRL_BITREVERSE_REVERSED, DL_CRC_BIT_NOT_REVERSED = CRC_CRCCTRL_BITREVERSE_NOT_REVERSED } |
enum | DL_CRC_INPUT_ENDIANESS { DL_CRC_INPUT_ENDIANESS_LITTLE_ENDIAN, DL_CRC_INPUT_ENDIANESS_BIG_ENDIAN = CRC_CRCCTRL_INPUT_ENDIANNESS_BIG_ENDIAN } |
enum | DL_CRC_OUTPUT_BYTESWAP { DL_CRC_OUTPUT_BYTESWAP_ENABLED = CRC_CRCCTRL_OUTPUT_BYTESWAP_ENABLE, DL_CRC_OUTPUT_BYTESWAP_DISABLED = CRC_CRCCTRL_OUTPUT_BYTESWAP_DISABLE } |
Functions | |
__STATIC_INLINE void | DL_CRC_enablePower (CRC_Regs *crc) |
Enables the Peripheral Write Enable (PWREN) register for the CRC. More... | |
__STATIC_INLINE void | DL_CRC_disablePower (CRC_Regs *crc) |
Disables the Peripheral Write Enable (PWREN) register for the CRC. More... | |
__STATIC_INLINE bool | DL_CRC_isPowerEnabled (const CRC_Regs *crc) |
Returns if the Peripheral Write Enable (PWREN) register for the CRC is enabled. More... | |
__STATIC_INLINE void | DL_CRC_reset (CRC_Regs *crc) |
Resets crc peripheral. More... | |
__STATIC_INLINE bool | DL_CRC_isReset (const CRC_Regs *crc) |
Returns if crc module has been reset. More... | |
__STATIC_INLINE void | DL_CRC_init (CRC_Regs *crc, DL_CRC_POLYNOMIAL poly, DL_CRC_BIT bitOrd, DL_CRC_INPUT_ENDIANESS inEndianness, DL_CRC_OUTPUT_BYTESWAP outByteSwap) |
Initializes CRC. More... | |
__STATIC_INLINE void | DL_CRC_setSeed16 (CRC_Regs *crc, uint16_t seed) |
Initializes the seed for a 16-bit polynomial CRC calculation. More... | |
__STATIC_INLINE void | DL_CRC_setSeed32 (CRC_Regs *crc, uint32_t seed) |
Initializes the seed for a 32-bit polynomial CRC calculation. More... | |
__STATIC_INLINE void | DL_CRC_feedData8 (CRC_Regs *crc, uint8_t dataIn) |
Feeds 8-bit data into the CRC calculation. More... | |
__STATIC_INLINE void | DL_CRC_feedData16 (CRC_Regs *crc, uint16_t dataIn) |
Feeds 16-bit data into the CRC calculation. More... | |
__STATIC_INLINE void | DL_CRC_feedData32 (CRC_Regs *crc, uint32_t dataIn) |
Feeds 32-bit data into the CRC calculation. More... | |
__STATIC_INLINE uint16_t | DL_CRC_getResult16 (const CRC_Regs *crc) |
Returns the result from the 16-bit polynomial calculation. More... | |
__STATIC_INLINE uint32_t | DL_CRC_getResult32 (const CRC_Regs *crc) |
Returns the result from the 32-bit polynomial calculation. More... | |
uint32_t | DL_CRC_calculateBlock32 (CRC_Regs *crc, uint32_t seed, const uint32_t *ptr, uint32_t size) |
Calculates the CRC over a range of 32-bit values. More... | |
uint32_t | DL_CRC_calculateMemoryRange32 (CRC_Regs *crc, uint32_t seed, uint32_t *ptrStart, const uint32_t *ptrEnd) |
Calculates the CRC over a memory range. More... | |
uint16_t | DL_CRC_calculateBlock16 (CRC_Regs *crc, uint16_t seed, const uint16_t *ptr, uint16_t size) |
Calculates the CRC over a range of 16-bit values. More... | |
uint16_t | DL_CRC_calculateMemoryRange16 (CRC_Regs *crc, uint16_t seed, uint16_t *ptrStart, const uint16_t *ptrEnd) |
Calculates the CRC over a memory range. More... | |
__STATIC_INLINE uintptr_t | DL_CRC_getCRCINAddr (const CRC_Regs *crc) |
Returns the address of the CRC input data register. More... | |