⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crc_config.c

📁 Mplab C30编译器
💻 C
字号:
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "crc.h"

#ifdef _CRC_PROG_V1

/********************************************************************************* 
   Function Prototype : void CRC_Config(UINT16 poly , UINT16 config)
   
   Include            : crc.h
   
   Description        : This function configures CRC module.
   
   Arguments          :  poly - Polynomial to calculate CRC
						 config - This contains the parameter configured in CRCCON
						          register as defined below
						          CRC Mode bit
						             CRC_IDLE_STOP
						             CRC_IDLE_CON
						          Valid words 
						             CRC_POLYNOMIAL_LEN1 
						             CRC_POLYNOMIAL_LEN2
						             ..... 
						             CRC_POLYNOMIAL_LEN15
						             CRC_POLYNOMIAL_LEN16
						          Start CRC bit 
						             CRC_START_SERIAL_SHIFT
						             CRC_SERIAL_SHIFT_OFF
						             
   Returns            : None
   
   Remarks            : This function configures the XOR of polynomial term and
                        CRCCON register.                                                      
***********************************************************************************/
void CRC_Config(UINT16 poly , UINT16 config)
{
   CRCXOR = poly;
   CRCCON = config;
}

#else
#warning "Does not build on this target"
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -