iss.c

来自「mips下的ucos」· C语言 代码 · 共 30 行

C
30
字号
/* 
   Copyright (C) 2001, Lexra, Inc.
   Contributed by Pascal Cleve (pascal@lexra.com).

   This code is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#include "includes.h"

int IntClear __attribute__ ((section (".sio")));

#define IRQTIMER	0	/* Use interrupt 0 for the timer	*/

void OSTickISR (void)
{
  IntClear = 1 << (2+IRQTIMER);	// Clear the interrupt

  // Call back uCOS
  OSTimeTick();
}


void BSPInit()
{
  // The first 2 interrupts are software
  IRQInstall(2+IRQTIMER, OSTickISR);
}

⌨️ 快捷键说明

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