vic.c

来自「在软件Proteus中仿真ucos(ARM)」· C语言 代码 · 共 33 行

C
33
字号
#include "VIC.h"

#define uint32  unsigned int


void  IRQOpen(uint32 IntID,uint32 prority, int IntHandler )
{ 
   uint32 mask;
   mask                     = 1<<IntID;
   VIC->IntEnClr            = mask;
   VIC->IntSelect          &= ~mask;
   VIC->VectAddrTab[prority]= IntHandler;
   VIC->VectCntl[prority]   = IntID | (1<<5);
   VIC->IntEnable           = mask;
}

void  IRQClose(uint32 IntID)
{
   uint32 mask;
   mask                     = 1<<IntID;	
   VIC->IntEnClr            = mask;	  	
}



void IRQSoftTriger(uint32 IntID)
{
   uint32 mask;
   mask                     = 1<<IntID;
   VIC->SoftInt             = mask;
}

⌨️ 快捷键说明

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