MG32L003 Standard Peripherals Firmware Library
compute.h
1 /* Define to prevent recursive inclusion -------------------------------------*/
2 #ifndef __COMPUTE_H__
3 #define __COMPUTE_H__
4 
5 /* Includes ------------------------------------------------------------------*/
6 #include "mg32l003.h"
7 
8 /* Exported types ------------------------------------------------------------*/
9 /* Exported constants --------------------------------------------------------*/
10 extern uint32_t result1;
11 extern uint32_t result2;
12 extern uint32_t result3;
13 extern uint32_t result4;
14 
15 /* Exported macro ------------------------------------------------------------*/
16 #ifndef _countof
17 #define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
18 #endif
19 
20 /* Exported functions --------------------------------------------------------*/
21 
22 uint8_t compute(void);
23 uint16_t CRC16_X25_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len);
24 uint16_t CRC16_X25_ComputeBytesContinue(const uint8_t *ptr_data, uint32_t data_len);
25 uint16_t CRC16_X25_ComputeHalfWords(const uint16_t *ptr_data, uint32_t data_len);
26 uint16_t CRC16_X25_ComputeWords(const uint32_t *ptr_data, uint32_t data_len);
27 
28 #endif /* __COMPUTE_H__ */