📄 lpc_vic.h
字号:
#ifndef __LPC_VIC_H
#define __LPC_VIC_H
/***********************************************************************
* BU MMS China, Philips Semiconductor Software Support
* Embest info&Tech Co. Software Support
*---------------------------------------------------------------------------
* The software is delivered "AS IS" without warranty or condition of any
* kind, either express, implied or statutory. Everybody can use it as
* it is opened and without copyright. We will not take any law responsibility
* for any problem produced by using this software.
*---------------------------------------------------------------------------
* File name: LPC_Vic.h
* Description: Define VIC structure and relative micro
*
* History:
* 1. Date: Oct 28, 2004
* Author: Shawn Zhang Liu
* Description: Create
*
**********************************************************************/
#include "LPC_Type.h"
#include "LPC_Base.h"
#include "LPC_Lib.h"
#define IRQ_FLAG 0x80
#define INT_MAXNUM 32
/* Interrupt Source */
#define INT_WDT 0x1
#define INT_TIMER0 0x10
#define INT_TIMER1 0x20
#define INT_UART0 0x40
#define INT_UART1 0x80
#define INT_PWM0 0x100
#define INT_I2C 0x200
#define INT_SPI0 0x400
#define INT_SPI1 0x800
#define INT_PLL 0x1000
#define INT_RTC 0x2000
#define INT_EINT0 0x4000
#define INT_EINT1 0x8000
#define INT_EINT2 0x10000
#define INT_EINT3 0x20000
#define INT_AD 0x40000
#define INT_ALL 0xFFFFFFFF
/* Interrupt protection type */
typedef enum {
UserandPrivilegedMode=0,
PrivilegedMode
}LPC_Vic_ProtectionMode_t;
/* Vectored IRQ slots */
typedef enum {
VIC_Slot0 = 0, // highest priority
VIC_Slot1,
VIC_Slot2,
VIC_Slot3,
VIC_Slot4,
VIC_Slot5,
VIC_Slot6,
VIC_Slot7,
VIC_Slot8,
VIC_Slot9,
VIC_Slot10,
VIC_Slot11,
VIC_Slot12,
VIC_Slot13,
VIC_Slot14,
VIC_Slot15
}LPC_Vic_IRQSlots_t;
/* Declare API functions */
void VIC_SetProtectionMode(LPC_Vic_ProtectionMode_t ProtectionType);
LPC_Vic_ProtectionMode_t VIC_GetProtectionMode(void);
void VIC_Init(void);
void VIC_EnableInt(lpc_uint32 IntType);
void VIC_DisableInt(lpc_uint32 IntType);
lpc_uint32 VIC_GetIRQStatus(void);
lpc_uint32 VIC_GetFIQStatus(void);
void VIC_EnableNonVectoredIRQ(LPC_WORD32 pIRQSub);
void VIC_DisableNonVectoredIRQ(void);
void VIC_SetVectoredIRQ(LPC_WORD32 pIRQSub, LPC_Vic_IRQSlots_t VicIrqSlot,
unsigned long VicIntSource);
#endif // __LPC_VIC_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -