1234567891011121314151617181920212223242526272829303132333435363738 |
- /*
- / _____) _ | |
- ( (____ _____ ____ _| |_ _____ ____| |__
- \____ \| ___ | (_ _) ___ |/ ___) _ \
- _____) ) ____| | | || |_| ____( (___| | | |
- (______/|_____)_|_|_| \__)_____)\____)_| |_|
- (C)2014 Semtech
- Description: State Grid CRC, Whitening Method and Reverse Method
- License: Revised BSD License, see LICENSE.TXT file include in the project
- Maintainer: Jiapeng Li
- */
- #ifndef __SX1208_STATE_GRID_H
- #define __SX1208_STATE_GRID_H
- /** use <stdint.h> type */
- #include "stdint.h"
- #define SX1208_STATE_GRID_GOOD_CRC (0x0F47)
- uint16_t sx1208_state_grid_crc_calc(uint8_t *buf, uint8_t len);
- uint16_t sx1208_state_grid_crc_check(uint8_t *buf, uint8_t len);
- //uint8_t sx1208_state_grid_whitening_data(uint8_t data, uint8_t index);
- //void sx1208_state_grid_whitening_buf(uint8_t *buf, uint16_t len, uint8_t start_index);
- uint8_t sx1208_state_grid_whitening_reverse_data(uint8_t data, uint8_t index);
- void sx1208_state_grid_whitening_reverse_buf(uint8_t *buf, uint16_t len, uint8_t start_index);
- uint8_t sx1208_state_grid_reverse_whitening_data(uint8_t data, uint8_t index);
- void sx1208_state_grid_reverse_whitening_buf(uint8_t *buf, uint16_t len, uint8_t start_index);
- uint8_t sx1208_state_grid_reverse(uint8_t val);
- #endif
|