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

📄 isr_init.c

📁 对研究uc_os操作系统的非常有帮助
💻 C
字号:
#include "includes.h"

void  Sys_init(void);


void  Int1(void);
void  timer_init(void);

extern void  __OSTickISR(void);

void Sys_init()
{
 rINTCON = 0x0;
 rINTMOD = 0x0;
 rINTMSK=BIT_GLOBAL;

 
 rTCFG0      = 0x00ff0000;
 rTCFG1		 = 0x0300000;
 rTCNTB5     = 0x2710;
 rTCON		 = 0x2000000;
 rTCON		 = 0x5000000;
 
 OS_ENTER_CRITICAL();
 Uart_Printf("\n3");
 OS_EXIT_CRITICAL();
} 

void Int1(void)
{
 Uart_Printf("4");
}

void Int2(void)
{
 Uart_Printf("5");
}

void timer_init(void)
{
 pISR_TIMER0 = (unsigned)__OSTickISR;
 rINTCON=0x5;
 rINTMSK=~(BIT_TIMER5 | BIT_GLOBAL);
 
 OS_ENTER_CRITICAL();
 Uart_Printf("\n6");
 OS_EXIT_CRITICAL();
 
} 

⌨️ 快捷键说明

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