crc_config_intr.c

来自「基於 c51/8051 的 nand Flash Memory HY27US08」· C语言 代码 · 共 38 行

C
38
字号
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "crc.h"

#ifdef _CRC_PROG_V1

/******************************************************************************
 * Function:        void CRC_Config_INTR(UINT8 intr_byte)
 *
 * PreCondition:    None   
 *
 * Input:           intr_byte - Interrupt priority/State
 *                              bit 0 -  bit 2 --> priority setting
 *                                       bit 3 --> Interrupt Enable/Disable
 *                              bit 4 -  bit 7 --> unsused
 *                  
 * Output:          None
 *
 * Side Effects:    None
 *
 * Overview:        This function configures interrupts of CRC module
 *
 * Note:            None
 *****************************************************************************/

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 + =
减小字号Ctrl + -
显示快捷键?