#ifndef __LRC_H__
#define __LRC_H__

#include <stdint.h>

/*
 * Compute LRC value of p_buf[offset:offset+length]
 * Return : Computed LRC value.
 */
uint8_t computeLRC(uint8_t *p_buf, uint32_t offset, uint32_t length);

/*
 * Calculate the LRC of buffer and compare it with received LRC value.
 * Return : 0 for success, computed LRC value for fail.
 */
uint8_t checkLRC(uint8_t *p_buf, uint32_t buf_len);


#endif /* __LRC_H__ */

