qhwint.cpp

来自「针对嵌入式反应式系统开发的量子操作系统,见http://code.google.」· C++ 代码 · 共 61 行

CPP
61
字号
/* \file qhwint.cpp 
 *   portable hardware interrupt controller 
 */
#include "qf/qfpkg.h"
// include user specific VIC regs header

DEFINE_THIS_FILE;

//...................................................................
void QHwInt::enableGlobal()
{
	VIC *vic = VIC::instance();
	vic->gie(true);
}

//...................................................................
void QHwInt::disableGlobal()
{
	VIC *vic = VIC::instance();
	vic->gie(false);
}

//...................................................................
void QHwInt::enable(uint32_t irq)
{
	VIC *vic = VIC::instance();
	vic->ie(irq, true);
}

//...................................................................
void QHwInt::disable(uint32_t irq)
{
	VIC *vic = VIC::instance();
	vic->ie(irq, false);
}

//...................................................................
bool_t QHwInt::poll(uint32_t irq)
{
	VIC *vic = VIC::instance();
	return (bool_t)vic->iflag(irq);
}

//...................................................................
bool_t QHwInt::set(uint32_t irq)
{
	VIC *vic = VIC::instance();
	return (bool_t)vic->iflag(irq, true);
}

//...................................................................
bool_t QHwInt::clear(uint32_t irq)
{
	VIC *vic = VIC::instance();
	return (bool_t)vic->iflag(irq, false);
}




⌨️ 快捷键说明

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