/**
  ************************************* Copyright ****************************** 
  *
  *                 Copyright (C), 2012-2016, Radioway Tech. Co., Ltd.
  *                            All Rights Reserved
  *
  *    
  * FileName   : utilities.h
  * Version    : v1.0
  * Author     : Heb
  * Date       : 2024-03-18
  * Description: 
  * Function List: 
  	1. ....
          <version>: 
     <modify staff>: 
             <data>: 
      <description>: 
  	2. ...
  ******************************************************************************
 */

#ifndef __UTILITIES_H_
#define __UTILITIES_H_

#include <stdint.h>
#include <stdbool.h>

unsigned short crc_ccitt_generic( const unsigned char *input_str, unsigned char num_bytes );
unsigned short get_crc16(const unsigned char* ddata, unsigned char start, unsigned char length, unsigned short crc_init);
unsigned char bit_order(unsigned char in_data);
void ll_data_whitening(const  unsigned char *in_data, unsigned len, unsigned channel_index,  unsigned char *out_data);
//unsigned long ll_crc24_generate( unsigned char *ppdata, unsigned char len);
unsigned char check_sum(unsigned char *ptr, int len);

int32_t rand1( void );
void srand1( uint32_t seed );
int32_t randr( int32_t min, int32_t max );

unsigned int crc24(unsigned char *input, int len) ;
#endif


 

