📄 intr_bsp.c
字号:
//
// Copyright (c) Special Computing. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
//
// File: intr_bsp.c
//
// Interrupt BSP callback functions. OMAP3 SoC has one external interrupt
// pin. In general solution it can be used for cascade interrupt controller.
// However in most cases it will be used as simple interrupt input. To avoid
// unnecessary penalty not all BSPIntrXXXX functions are called by default
// OMAP3 interrupt module implementation.
//
//
#include <bsp.h>
//------------------------------------------------------------------------------
//
// Function: BSPIntrInit
//
// This function is called from OALIntrInit to initialize on-board secondary
// interrupt controller if exists. As long as GPIO interrupt edge registers
// are initialized in startup.s code function is stub only.
//
BOOL BSPIntrInit()
{
return TRUE;
}
//------------------------------------------------------------------------------
//
// Function: BSPIntrRequestIrqs
//
// This function is called from OALIntrRequestIrq to obtain IRQ for on-board
// devices if exists.
//
BOOL BSPIntrRequestIrqs(DEVICE_LOCATION *pDevLoc, UINT32 *pCount, UINT32 *pIrq)
{
BOOL rc = FALSE;
OALMSG(OAL_INTR&&OAL_FUNC, (
L"+BSPIntrRequestIrq(0x%08x->%d/%d/0x%08x/%d, 0x%08x)\r\n", pDevLoc,
pDevLoc->IfcType, pDevLoc->BusNumber, pDevLoc->LogicalLoc,
pDevLoc->Pin, pIrq
));
switch (pDevLoc->IfcType) {
case Internal:
//switch ((ULONG)pDevLoc->LogicalLoc) {
//case BSP_SMSC91C96_REGS_PA:
// *pCount = 1;
// *pIrq = IRQ_GPIO_0 + 92;
// rc = TRUE;
// break;
//}
break;
}
OALMSG(OAL_INTR&&OAL_FUNC, (L"-BSPIntrRequestIrq(rc = %d)\r\n", rc));
return rc;
}
//------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -