/**
******************************************************************************
* @file STLcrc32.h
* @author MCD Application Team
* @version V1.0.0
* @date May-2012
* @brief This file contains all the functions prototypes for the
* ADC firmware library.
******************************************************************************
* @copyright
*
*
© COPYRIGHT 2012 STMicroelectronics
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STL_CRC32_H
#define __STL_CRC32_H
/* Includes ------------------------------------------------------------------*/
#include "gd32f30x_libopt.h"
#include "STLmisc.h"
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* DR is the read/write data register which holds the 32-bit CRC. Each write in
this register re-computes a CRC with the new data and the previous CRC. The
result is written back into DR. (kind of CRC) */
/* IDR is a 8-bit storage register which allows to keep a test ID or the 8 LSBs
of a previous CRC for instance */
/* CR is the Control Register. It contains the CRC reset bit (other bits are
reserved). The CRC reset value is 0xFFFFFFFF */
#define CRC_RESET (uint32_t)(0x00000001)
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
void CRC_Init(void);
uint32_t CRC_CalcBlockCrc(uc32 *p, uint32_t len);
#endif /*__CRC_H */
/******************* (C) COPYRIGHT STMicroelectronics *****END OF FILE****/