📄 ext_irq.c
字号:
//*----------------------------------------------------------------------------
//* 文件名 : ext_irq.c
//* 创建人 :张正锋 2006/2/21 zhangzf@baite-group.com
//*----------------------------------------------------------------------------
// Include Standard LIB files
#include "project.h"
int status_irq = 0 ;
//*----------------------------------------------------------------------------
//* 函数名 : at91_IRQ0_handler
//* 功能 : Irq Handler called by the IRQ0 interrupt with AT91 compatibility
//* 输入参数 : none
//* 返回值 : none
//* 创建人 :张正锋 2006/2/21 zhangzf@baite-group.com
//*----------------------------------------------------------------------------
void at91_IRQ0_handler(void)
{
if (status_irq == 0) status_irq = 1;
else status_irq = 0 ;
//* Read the output state
if ( (AT91F_PIO_GetInput(AT91C_BASE_PIOB) & AT91B_LED1 ) == AT91B_LED1)
{
AT91F_PIO_ClearOutput( AT91C_BASE_PIOB, AT91B_LED1 );
}
else
{
AT91F_PIO_SetOutput( AT91C_BASE_PIOB, AT91B_LED1 );
}
//* while SW1 is push loop
while ( (AT91F_PIO_GetInput(AT91C_BASE_PIOA) & AT91A_SW1 ) != AT91A_SW1);
}
//*----------------------------------------------------------------------------
//* 函数名 : FIQ_init_handler
//* 功能 : Irq Handler called by the FIQ interrupt with AT91 compatibility
//* 输入参数 : none
//* 返回值 : none
//* 创建人 :张正锋 2006/2/21 zhangzf@baite-group.com
///*----------------------------------------------------------------------------
void FIQ_init_handler(void)
{
// Read the output state
if ( (AT91F_PIO_GetInput(AT91C_BASE_PIOB) & AT91B_LED2 ) == AT91B_LED2 )
{
AT91F_PIO_ClearOutput( AT91C_BASE_PIOB, AT91B_LED2 );
}
else
{
AT91F_PIO_SetOutput( AT91C_BASE_PIOB, AT91B_LED2 );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -