?? ioctrl.c
字號:
#include <io.h>
#include <sys/hyrtk.h>
#include "ioctrl.h"
#include "devctrl.h"
void SetLEDState(LEDControl LEDsOn, LEDControl LEDsOff)
{
LEDsOff &= LatchReg;
LatchReg |= LEDsOn;
LatchReg &= ~LEDsOff;
outpw(LATCH_ADDR, LatchReg);
}
UINT32 GetKeyState(UINT32 Keys)
{
return (((~inpw(LATCH_ADDR)) & Keys) == Keys);
}
UINT32 ReadLatch(UINT32 Keys)
{
return ((~inpw(LATCH_ADDR)) & Keys);
}
void WaitForKeyChange(UINT32 Keys)
{
int keys = ReadLatch(Keys);
while (keys == ReadLatch(Keys))
DelayBy(1000);
}
UINT32 GetGPInput(UINT32 GPInputs)
{
return (((~inpw(LATCH_ADDR)) & GPInputs) == GPInputs);
}
void SetGPOutput(GPOutputControl GPOutOn, GPOutputControl GPOutOff)
{
GPOutOff &= LatchReg;
LatchReg |= GPOutOn;
LatchReg &= ~GPOutOff;
outpw(LATCH_ADDR, LatchReg);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -