📄 iolpc2148.h
字号:
/***************************************************************************
**
** This file defines the Special Function Registers for
** NXP LPC2148
**
** Used with ARM IAR C/C++ Compiler and Assembler.
**
** (c) Copyright IAR Systems 2005
**
** $Revision: 1.9.2.1 $
**
** Note: Only little endian addressing of 8 bit registers.
***************************************************************************/
#ifndef __IOLPC2148_H
#define __IOLPC2148_H
#if (((__TID__ >> 8) & 0x7F) != 0x4F) /* 0x4F = 79 dec */
#error This file should only be compiled by ARM IAR compiler and assembler
#endif
#include "io_macros.h"
/***************************************************************************
***************************************************************************
**
** LPC2148 SPECIAL FUNCTION REGISTERS
**
***************************************************************************
***************************************************************************
***************************************************************************/
/* C-compiler specific declarations ***************************************/
#ifdef __IAR_SYSTEMS_ICC__
#ifndef _SYSTEM_BUILD
#pragma system_include
#endif
/* External interrupt register */
typedef struct{
__REG32 EINT0 : 1;
__REG32 EINT1 : 1;
__REG32 EINT2 : 1;
__REG32 EINT3 : 1;
__REG32 :28;
} __extint_bits;
/* External interrupt wakeup register */
typedef struct{
__REG32 EXTWAKE0 : 1;
__REG32 EXTWAKE1 : 1;
__REG32 EXTWAKE2 : 1;
__REG32 EXTWAKE3 : 1;
__REG32 : 1;
__REG32 USBWAKE : 1;
__REG32 : 8;
__REG32 BODWAKE : 1;
__REG32 RTCWAKE : 1;
__REG32 :16;
} __extwake_bits;
/* External Interrupt Mode Register */
typedef struct{
__REG32 EXTMODE0 : 1;
__REG32 EXTMODE1 : 1;
__REG32 EXTMODE2 : 1;
__REG32 EXTMODE3 : 1;
__REG32 :28;
} __extmode_bits;
/* External Interrupt Polarity Register */
typedef struct{
__REG32 EXTPOLAR0 : 1;
__REG32 EXTPOLAR1 : 1;
__REG32 EXTPOLAR2 : 1;
__REG32 EXTPOLAR3 : 1;
__REG32 :28;
} __extpolar_bits;
/* System Control and Status flags register */
typedef struct{
__REG32 GPIO0M : 1;
__REG32 GPIO1M : 1;
__REG32 :30;
} __scs_bits;
/* Memory mapping control register */
typedef struct{
__REG32 MAP : 2;
__REG32 :30;
} __memmap_bits;
/* PLL control register */
typedef struct{
__REG32 PLLE : 1;
__REG32 PLLC : 1;
__REG32 :30;
} __pllcon_bits;
/* PLL config register */
typedef struct{
__REG32 MSEL : 5;
__REG32 PSEL : 2;
__REG32 :25;
} __pllcfg_bits;
/* PLL status register */
typedef struct{
__REG32 MSEL : 5;
__REG32 PSEL : 2;
__REG32 : 1;
__REG32 PLLE : 1;
__REG32 PLLC : 1;
__REG32 PLOCK : 1;
__REG32 :21;
} __pllstat_bits;
/* PLL feed register */
typedef struct{
__REG32 FEED : 8;
__REG32 :24;
} __pllfeed_bits;
/* Power control register */
typedef struct{
__REG32 IDL : 1;
__REG32 PD : 1;
__REG32 BODPDM : 1;
__REG32 BOGD : 1;
__REG32 BORD : 1;
__REG32 :27;
} __pcon_bits;
/* Power control for peripherals register */
typedef struct{
__REG32 : 1;
__REG32 PCTIM0 : 1;
__REG32 PCTIM1 : 1;
__REG32 PCURT0 : 1;
__REG32 PCURT1 : 1;
__REG32 PCPWM0 : 1;
__REG32 : 1;
__REG32 PCI2C0 : 1;
__REG32 PCSPI0 : 1;
__REG32 PCRTC : 1;
__REG32 PCSPI1 : 1;
__REG32 : 1;
__REG32 PCAD0 : 1;
__REG32 : 6;
__REG32 PCI2C1 : 1;
__REG32 PCAD1 : 1;
__REG32 :11;
} __pconp_bits;
/* Reset Source Identification Register */
typedef struct{
__REG32 POR : 1;
__REG32 EXTR : 1;
__REG32 WDTR : 1;
__REG32 BODR : 1;
__REG32 :28;
} __rsid_bits;
/* VPB divider register */
typedef struct{
__REG32 VPBDIV : 2;
__REG32 :30;
} __vpbdiv_bits;
/* Memory accelerator module control register */
typedef struct {
__REG32 MODECTRL :2;
__REG32 :30;
} __mamcr_bits;
/* Memory accelerator module timing register */
typedef struct {
__REG32 CYCLES :3;
__REG32 :29;
} __mamtim_bits;
/* VIC Interrupt registers */
typedef struct{
__REG32 INT0 : 1;
__REG32 INT1 : 1;
__REG32 INT2 : 1;
__REG32 INT3 : 1;
__REG32 INT4 : 1;
__REG32 INT5 : 1;
__REG32 INT6 : 1;
__REG32 INT7 : 1;
__REG32 INT8 : 1;
__REG32 INT9 : 1;
__REG32 INT10 : 1;
__REG32 INT11 : 1;
__REG32 INT12 : 1;
__REG32 INT13 : 1;
__REG32 INT14 : 1;
__REG32 INT15 : 1;
__REG32 INT16 : 1;
__REG32 INT17 : 1;
__REG32 INT18 : 1;
__REG32 INT19 : 1;
__REG32 INT20 : 1;
__REG32 INT21 : 1;
__REG32 INT22 : 1;
__REG32 INT23 : 1;
__REG32 INT24 : 1;
__REG32 INT25 : 1;
__REG32 INT26 : 1;
__REG32 INT27 : 1;
__REG32 INT28 : 1;
__REG32 INT29 : 1;
__REG32 INT30 : 1;
__REG32 INT31 : 1;
} __vicint_bits;
/* VIC Vector control registers */
typedef struct{
__REG32 NUMBER : 5;
__REG32 ENABLED : 1;
__REG32 :26;
} __vicvectcntl_bits;
/* VIC protection enable register */
typedef struct{
__REG32 PROTECT : 1;
__REG32 :31;
} __vicprotection_bits;
/* Pin function select register 0 */
typedef struct{
__REG32 P0_0 : 2;
__REG32 P0_1 : 2;
__REG32 P0_2 : 2;
__REG32 P0_3 : 2;
__REG32 P0_4 : 2;
__REG32 P0_5 : 2;
__REG32 P0_6 : 2;
__REG32 P0_7 : 2;
__REG32 P0_8 : 2;
__REG32 P0_9 : 2;
__REG32 P0_10 : 2;
__REG32 P0_11 : 2;
__REG32 P0_12 : 2;
__REG32 P0_13 : 2;
__REG32 P0_14 : 2;
__REG32 P0_15 : 2;
} __pinsel0_bits;
/* Pin function select register 1 */
typedef struct{
__REG32 P0_16 : 2;
__REG32 P0_17 : 2;
__REG32 P0_18 : 2;
__REG32 P0_19 : 2;
__REG32 P0_20 : 2;
__REG32 P0_21 : 2;
__REG32 P0_22 : 2;
__REG32 P0_23 : 2;
__REG32 P0_24 : 2;
__REG32 P0_25 : 2;
__REG32 : 2;
__REG32 P0_27 : 2;
__REG32 P0_28 : 2;
__REG32 P0_29 : 2;
__REG32 P0_30 : 2;
__REG32 P0_31 : 2;
} __pinsel1_bits;
/* GPIO 0 Registers */
typedef struct {
__REG32 P0_0 : 1;
__REG32 P0_1 : 1;
__REG32 P0_2 : 1;
__REG32 P0_3 : 1;
__REG32 P0_4 : 1;
__REG32 P0_5 : 1;
__REG32 P0_6 : 1;
__REG32 P0_7 : 1;
__REG32 P0_8 : 1;
__REG32 P0_9 : 1;
__REG32 P0_10 : 1;
__REG32 P0_11 : 1;
__REG32 P0_12 : 1;
__REG32 P0_13 : 1;
__REG32 P0_14 : 1;
__REG32 P0_15 : 1;
__REG32 P0_16 : 1;
__REG32 P0_17 : 1;
__REG32 P0_18 : 1;
__REG32 P0_19 : 1;
__REG32 P0_20 : 1;
__REG32 P0_21 : 1;
__REG32 P0_22 : 1;
__REG32 P0_23 : 1;
__REG32 P0_24 : 1;
__REG32 P0_25 : 1;
__REG32 P0_26 : 1;
__REG32 P0_27 : 1;
__REG32 P0_28 : 1;
__REG32 P0_29 : 1;
__REG32 P0_30 : 1;
__REG32 P0_31 : 1;
} __gpio0_bits;
/* FGPIO 0 Registers*/
typedef union{
struct {
__REG32 P0_0 : 1;
__REG32 P0_1 : 1;
__REG32 P0_2 : 1;
__REG32 P0_3 : 1;
__REG32 P0_4 : 1;
__REG32 P0_5 : 1;
__REG32 P0_6 : 1;
__REG32 P0_7 : 1;
__REG32 P0_8 : 1;
__REG32 P0_9 : 1;
__REG32 P0_10 : 1;
__REG32 P0_11 : 1;
__REG32 P0_12 : 1;
__REG32 P0_13 : 1;
__REG32 P0_14 : 1;
__REG32 P0_15 : 1;
__REG32 P0_16 : 1;
__REG32 P0_17 : 1;
__REG32 P0_18 : 1;
__REG32 P0_19 : 1;
__REG32 P0_20 : 1;
__REG32 P0_21 : 1;
__REG32 P0_22 : 1;
__REG32 P0_23 : 1;
__REG32 P0_24 : 1;
__REG32 P0_25 : 1;
__REG32 P0_26 : 1;
__REG32 P0_27 : 1;
__REG32 P0_28 : 1;
__REG32 P0_29 : 1;
__REG32 P0_30 : 1;
__REG32 P0_31 : 1;
};
struct
{
union
{
struct{
__REG8 P0_0 : 1;
__REG8 P0_1 : 1;
__REG8 P0_2 : 1;
__REG8 P0_3 : 1;
__REG8 P0_4 : 1;
__REG8 P0_5 : 1;
__REG8 P0_6 : 1;
__REG8 P0_7 : 1;
} __byte0_bit;
__REG8 __byte0;
};
union
{
struct{
__REG8 P0_0 : 1;
__REG8 P0_1 : 1;
__REG8 P0_2 : 1;
__REG8 P0_3 : 1;
__REG8 P0_4 : 1;
__REG8 P0_5 : 1;
__REG8 P0_6 : 1;
__REG8 P0_7 : 1;
} __byte1_bit;
__REG8 __byte1;
};
union
{
struct{
__REG8 P0_0 : 1;
__REG8 P0_1 : 1;
__REG8 P0_2 : 1;
__REG8 P0_3 : 1;
__REG8 P0_4 : 1;
__REG8 P0_5 : 1;
__REG8 P0_6 : 1;
__REG8 P0_7 : 1;
} __byte2_bit;
__REG8 __byte2;
};
union
{
struct{
__REG8 P0_0 : 1;
__REG8 P0_1 : 1;
__REG8 P0_2 : 1;
__REG8 P0_3 : 1;
__REG8 P0_4 : 1;
__REG8 P0_5 : 1;
__REG8 P0_6 : 1;
__REG8 P0_7 : 1;
} __byte3_bit;
__REG8 __byte3;
};
};
struct
{
union
{
struct{
__REG16 P0_0 : 1;
__REG16 P0_1 : 1;
__REG16 P0_2 : 1;
__REG16 P0_3 : 1;
__REG16 P0_4 : 1;
__REG16 P0_5 : 1;
__REG16 P0_6 : 1;
__REG16 P0_7 : 1;
__REG16 P0_8 : 1;
__REG16 P0_9 : 1;
__REG16 P0_10 : 1;
__REG16 P0_11 : 1;
__REG16 P0_12 : 1;
__REG16 P0_13 : 1;
__REG16 P0_14 : 1;
__REG16 P0_15 : 1;
} __shortl_bit;
__REG16 __shortl;
};
union
{
struct{
__REG16 P0_0 : 1;
__REG16 P0_1 : 1;
__REG16 P0_2 : 1;
__REG16 P0_3 : 1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -