📄 otgisr.c
字号:
/*
//*************************************************************************
//
// P H I L I P S P R O P R I E T A R Y
//
// COPYRIGHT (c) 2000 BY PHILIPS SINGAPORE.
// -- ALL RIGHTS RESERVED --
//
// File Name: OtgISR.C
// Author: Zhongwei Wang
// Created: Sep. 22, 2001
// Modified:
// Revision: 0.1
//
//*************************************************************************
*/
#include <stdio.h>
#include <string.h>
#include <dos.h>
#include "BasicTyp.h"
#include "common.h"
#include "SysCnfg.h"
#include "HAL4Sys.h"
#include "HAL4ISA.h"
#include "HAL4IKit.h"
#include "HAL4D13.h"
#include "HAL4HC.h"
#include "HcISR.h"
#include "HAL4OTG.h"
#include "OTGSVC.h"
//*************************************************************************
// Public static data
//*************************************************************************
extern bIRQL;
extern OTG_TCB OtgTcb;
//*************************************************************************
// ISR Subroutine
//*************************************************************************
void fn_OTG_isr(void)
{
USHORT wTemp,wTemp2;
wTemp = Hal4Hc_RegInW(REG_OTG_INTERRUPT);
wTemp2 = Hal4Hc_RegInW(REG_OTG_STATUS);
Hal4Hc_RegOutW(REG_OTG_INTERRUPT, 0xffff); //clear all interrupts
#if 1
printf(">>> OTG Interupt: 0x%x OTG Status: 0x%x <<<\n", wTemp,wTemp2);
#else
if(wTemp & OTG_IRQ_ID)
{
printf(">>> Interupt: OTG ID[%d]\n",wTemp2&OTG_IRQ_ID?1:0);
}
if(wTemp & OTG_IRQ_A_VBUS_VLD)
{
printf(">>> Interupt: OTG A_VBUS_VLD[%d]\n",wTemp2&OTG_IRQ_A_VBUS_VLD?1:0);
}
if(wTemp & OTG_IRQ_B_SESS_END)
{
printf(">>> Interupt: OTG B_SESS_END[%d]\n",wTemp2&OTG_IRQ_B_SESS_END?1:0);
}
if(wTemp & OTG_IRQ_A_SESS_VLD)
{
printf(">>> Interupt: OTG A_SESS_VLD[%d]\n",wTemp2&OTG_IRQ_A_SESS_VLD?1:0);
}
if(wTemp & OTG_IRQ_B_SESS_VLD)
{
printf(">>> Interupt: OTG B_SESS_VLD[%d]\n",wTemp2&OTG_IRQ_B_SESS_VLD?1:0);
}
if(wTemp & OTG_IRQ_RMT_CONN)
{
printf(">>> Interupt: OTG RMT_CONN[%d]\n",wTemp2&OTG_IRQ_RMT_CONN?1:0);
}
if(wTemp & OTG_IRQ_SUSPND)
{
printf(">>> Interupt: OTG BUS_SUSPEND[%d]\n",wTemp2&OTG_IRQ_SUSPND?1:0);
}
if(wTemp & OTG_IRQ_RESUME)
{
printf(">>> Interupt: OTG BUS_RESUME[%d]\n",wTemp2&OTG_IRQ_RESUME?1:0);
}
if(wTemp & OTG_IRQ_SRP_DET)
{
printf(">>> Interupt: OTG A_SRP_DET\n");
}
if(wTemp & OTG_IRQ_SE0_SRP)
{
printf(">>> Interupt: OTG B_SE0_SRP[%d]\n",wTemp2&OTG_IRQ_SE0_SRP?1:0);
}
if(wTemp & OTG_IRQ_TMR)
{
printf(">>> Interupt: OTG OTG_TMR_TIMEOUT\n");
}
#endif
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -