Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fsl_crc_hal.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "fsl_device_registers.h"

Enumerations

enum  crc_status_t {
  kStatus_CRC_Success = 0U,
  kStatus_CRC_InvalidArgument = 1U,
  kStatus_CRC_Failed = 2U
}
 

Definitions More...

 
enum  crc_transpose_t {
  kCrcNoTranspose = 0U,
  kCrcTransposeBits = 1U,
  kCrcTransposeBoth = 2U,
  kCrcTransposeBytes = 3U
}
 Define type of enumerating transpose modes for CRC peripheral. More...
 
enum  crc_prot_width_t {
  kCrc16Bits = 0U,
  kCrc32Bits = 1U
}
 Define type of enumerating CRC protocol widths for CRC peripheral. More...
 

Functions

CRC-related feature APIs

API

void CRC_HAL_Init (CRC_Type *base)
 This function initializes the module to a known state. More...
 
static uint32_t CRC_HAL_GetDataReg (CRC_Type *base)
 Returns the current CRC result from the data register. More...
 
static uint16_t CRC_HAL_GetDataHReg (CRC_Type *base)
 Returns the upper 16 bits of the current CRC result from the data register. More...
 
static uint16_t CRC_HAL_GetDataLReg (CRC_Type *base)
 Returns the lower 16 bits of the current CRC result from the data register. More...
 
static void CRC_HAL_SetDataReg (CRC_Type *base, uint32_t value)
 Sets the CRC data register (4 bytes). More...
 
static void CRC_HAL_SetDataHReg (CRC_Type *base, uint16_t value)
 Sets the CRC data register (upper 2 bytes). More...
 
static void CRC_HAL_SetDataLReg (CRC_Type *base, uint16_t value)
 Sets the CRC data register (lower 2 bytes). More...
 
static void CRC_HAL_SetDataHLReg (CRC_Type *base, uint8_t value)
 Sets the CRC data register (HL byte). More...
 
static void CRC_HAL_SetDataHUReg (CRC_Type *base, uint8_t value)
 Sets the CRC data register (HU byte). More...
 
static void CRC_HAL_SetDataLLReg (CRC_Type *base, uint8_t value)
 Sets the CRC data register (LL byte). More...
 
static void CRC_HAL_SetDataLUReg (CRC_Type *base, uint8_t value)
 Sets the CRC data register (LU byte). More...
 
static uint32_t CRC_HAL_GetPolyReg (CRC_Type *base)
 Returns the polynomial register value. More...
 
static uint16_t CRC_HAL_GetPolyHReg (CRC_Type *base)
 Returns the upper 16 bits of polynomial register. More...
 
static uint16_t CRC_HAL_GetPolyLReg (CRC_Type *base)
 Returns the lower 16 bits of polynomial register. More...
 
static void CRC_HAL_SetPolyReg (CRC_Type *base, uint32_t value)
 Sets the polynomial register. More...
 
static void CRC_HAL_SetPolyHReg (CRC_Type *base, uint16_t value)
 Sets the upper 16 bits of polynomial register. More...
 
static void CRC_HAL_SetPolyLReg (CRC_Type *base, uint16_t value)
 Sets the lower 16 bits of polynomial register. More...
 
static uint32_t CRC_HAL_GetCtrlReg (CRC_Type *base)
 Returns the CRC control register. More...
 
static void CRC_HAL_SetCtrlReg (CRC_Type *base, uint32_t value)
 Sets the CRC control register. More...
 
static bool CRC_HAL_GetSeedOrDataMode (CRC_Type *base)
 Gets the CRC seed mode. More...
 
static void CRC_HAL_SetSeedOrDataMode (CRC_Type *base, bool enable)
 Sets the CRC seed mode. More...
 
static crc_transpose_t CRC_HAL_GetWriteTranspose (CRC_Type *base)
 Gets the CRC transpose type for writes. More...
 
static void CRC_HAL_SetWriteTranspose (CRC_Type *base, crc_transpose_t transp)
 Sets the CRC transpose type for writes. More...
 
static crc_transpose_t CRC_HAL_GetReadTranspose (CRC_Type *base)
 Gets the CRC transpose type for reads. More...
 
static void CRC_HAL_SetReadTranspose (CRC_Type *base, crc_transpose_t transp)
 Sets the CRC transpose type for reads. More...
 
static bool CRC_HAL_GetXorMode (CRC_Type *base)
 Gets the CRC XOR mode. More...
 
static void CRC_HAL_SetXorMode (CRC_Type *base, bool enable)
 Sets the CRC XOR mode. More...
 
static crc_prot_width_t CRC_HAL_GetProtocolWidth (CRC_Type *base)
 Gets the CRC protocol width. More...
 
static void CRC_HAL_SetProtocolWidth (CRC_Type *base, crc_prot_width_t width)
 Sets the CRC protocol width. More...
 
uint32_t CRC_HAL_GetCrc32 (CRC_Type *base, uint32_t data, bool newSeed, uint32_t seed)
 CRC_HAL_GetCrc32. More...
 
uint32_t CRC_HAL_GetCrc16 (CRC_Type *base, uint16_t data, bool newSeed, uint32_t seed)
 CRC_HAL_GetCrc16. More...
 
uint32_t CRC_HAL_GetCrc8 (CRC_Type *base, uint8_t data, bool newSeed, uint32_t seed)
 CRC_HAL_GetCrc8. More...
 
uint32_t CRC_HAL_GetCrcResult (CRC_Type *base)
 CRC_HAL_GetCrcResult. More...