Bouffalo SDK  1.0
Bouffalolab Software Development Kit
bflb_cks.h
Go to the documentation of this file.
1 #ifndef _BFLB_CKS_H
2 #define _BFLB_CKS_H
3 
4 #include "bflb_core.h"
5 
17 #define CKS_LITTLE_ENDIAN 0
18 #define CKS_BIG_ENDIAN 1
19 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
32 void bflb_cks_reset(struct bflb_device_s *dev);
33 
40 void bflb_cks_set_endian(struct bflb_device_s *dev, uint8_t endian);
41 
50 uint16_t bflb_cks_compute(struct bflb_device_s *dev, uint8_t *data, uint32_t length);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
64 #endif
void bflb_cks_reset(struct bflb_device_s *dev)
Reset checksum module.
void bflb_cks_set_endian(struct bflb_device_s *dev, uint8_t endian)
Set checksum bitorder.
uint16_t bflb_cks_compute(struct bflb_device_s *dev, uint8_t *data, uint32_t length)
Compute data with checksum.