📄 isr.c
字号:
#include<windows.h>
#include<stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "2410addr.h"
HANDLE m_hevInterrupt;
DWORD dwSysIntr_Keybd;
BOOL IsrThreadProc()
{
DWORD dwPriority;
// look for our priority in the registry -- this routine sets it to zero if
// it can't find it.
dwPriority = 240; // default value is 145
m_hevInterrupt = CreateEvent(NULL,FALSE,FALSE,NULL);
if (m_hevInterrupt == INVALID_HANDLE_VALUE) {
return 1;
}
dwSysIntr_Keybd=0x10;
if (!InterruptInitialize(dwSysIntr_Keybd,m_hevInterrupt,NULL,0))
{
return 1;
}
while (1)
{
if ( WaitForSingleObject(m_hevInterrupt, INFINITE) == WAIT_TIMEOUT )
Uart_Printf("timeout\n");
else
Uart_Printf("hdlc interrupt\n");
InterruptDone(dwSysIntr_Keybd);
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -