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

📄 crc_config_intr.c

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

#ifdef _CRC_PROG_V1

/********************************************************************************** 
   Function Prototype : void CRC_Config_INTR(UINT8 intr_byte)
   
   Include            : crc.h
   
   Description        :This function configures CRC interrupts.
  
   Arguments          : intr_byte -  I2C interrupt priority and enable/disable
                        information as defined below
                        CRC Interrupt enable/disable
	                        CRC_INT_ENABLE
	                        CRC_INT_DISABLE
                        CRC Interrupt priority
	                        CRC_INT_PRIOR_7
	                        CRC_INT_PRIOR_6
	                        CRC_INT_PRIOR_5
	                        CRC_INT_PRIOR_4
	                        CRC_INT_PRIOR_3
	                        CRC_INT_PRIOR_2
	                        CRC_INT_PRIOR_1
	                        CRC_INT_PRIOR_0
   
   Returns            : None
   
   Remarks            : This function clears the Interrupt Flag bits, sets the
                        interrupt priorities of master and slave and enables/disables
                        the interrupt  
*************************************************************************************/                                                                                        

void CRC_Config_INTR(UINT8 intr_byte)
{
   IFS4bits.CRCIF = 0;                       /* clear the CRC Interrupts */

   IPC16bits.CRCIP = (intr_byte & 0x07);
   IEC4bits.CRCIE = (intr_byte & 0x08)>>3;
}

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

⌨️ 快捷键说明

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