MG32L003 Standard Peripherals Firmware Library
mg32l003_crc.h
Go to the documentation of this file.
1 
10 /* Define to prevent recursive inclusion -------------------------------------*/
11 #ifndef __MG32L003_CRC_H
12 #define __MG32L003_CRC_H
13 
14 #ifdef __cplusplus
15  extern "C" {
16 #endif
17 
18 /* Includes ------------------------------------------------------------------*/
19 #include "mg32l003.h"
20 
29 /* Exported types ------------------------------------------------------------*/
30 /* Exported constants --------------------------------------------------------*/
31 
36 #define CRC_DataAddress (CRC_BASE + 0x80)
42 /* Exported macro ------------------------------------------------------------*/
43 /* Exported functions --------------------------------------------------------*/
44 
45 void CRC_InitResult(void);
46 void CRC_DeInit(void);
47 uint32_t CRC_Accumulate(const uint8_t *ptr_data, uint32_t bufferLength);
48 uint32_t CRC_Calculate(const uint8_t *ptr_data, uint32_t bufferLength);
49 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif /* __MG32L003_CRC_H */
void CRC_InitResult(void)
Initialize CRC caculation.
Definition: mg32l003_crc.c:37
void CRC_DeInit(void)
DeInitializes the CRC peripheral.
Definition: mg32l003_crc.c:46
uint32_t CRC_Accumulate(const uint8_t *ptr_data, uint32_t bufferLength)
Computes the 16-bit CRC of 8-bit data buffer using combination of the previous CRC value and the new ...
Definition: mg32l003_crc.c:62
uint32_t CRC_Calculate(const uint8_t *ptr_data, uint32_t bufferLength)
Computes the 16-bit CRC of 8-bit data buffer independently of the previous CRC value.
Definition: mg32l003_crc.c:83