📄 vic.h
字号:
/****************************************Copyright (c)*************************
** Guangzhou ZLG-MCU Development Co.,LTD.
** graduate school
** http://www.zlgmcu.com
**
**--------------File Info------------------------------------------------------
** File Name: VIC.h
** Last modified Date: 2004-10-12
** Last Version: 1.0
** Description: operater IRQ for LPC2xxx
**
**-----------------------------------------------------------------------------
** Created date: 2004-10-12
** Version: 1.0
** Description: operater IRQ for LPC2xxx
**
**-----------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Description:
**
******************************************************************************/
#ifndef __VIC_H
#define __VIC_H
#include "config.h"
#ifdef __cplusplus
extern "C" {
#endif
// Interrupt Source(中断源)
enum InterruptSource
{
IS_WDT = 0, // 看门狗
IS_SOFT, // 软件中断(保留)
IS_DRX, // ARM内核,EmbeddedICE, DbgCommRx
IS_DTX, // ARM内核,EmbeddedICE, DbgCommTx
IS_TIME0, // 定时器0
IS_TIME1, // 定时器1
IS_UART0, // 串口0
IS_UART1, // 串口1
IS_PWM0, // 串口PWM0
IS_I2C0, // I2C0
IS_SPI0, // SPI0
IS_SPI1, // SPI1
IS_PLL, // PLL
IS_RTC, // RTC
IS_EINT0, // EINT0
IS_EINT1, // EINT1
IS_EINT2, // EINT2
IS_EINT3, // EINT3
IS_ADC0, // ADC0
IS_I2C1, // I2C1
IS_BOD, // BOD
IS_ADC1 // ADC1
};
#define IS_I2C IS_I2C0
#define IS_SPI IS_SPI0
#define IS_ADC IS_SPI0
typedef void __irq (*PISR)(void);
/******************************************************************************
** Function name: VIC_InstallIRQ
** Descriptions: install IRQ(安装IRQ)
** Input: nIntSrc: interrupt source, et I2C, PWM(中断源,如I2C、PWM等)
** pfnISR:interrupt serve routine(中断服务程序)
** IntPrio:interrupt priority. The value less, the priority higher
(中断优先级,数值越低,优先级越高。)
** Output: return: TRUE: success(TRUE:成功)
FALSE: fail(FALSE:失败)
** Created Date: 2004-10-12
******************************************************************************/
BOOL VIC_InstallIRQ(uint8 nIntSrc, PISR pfnISR, uint8 IntPrio);
#ifdef __cplusplus
}
#endif
#endif // __VIC_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -