⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iolpc2148.h

📁 基于 Philips 公司的 ARM-7 使用之 uC/OS-II 作业系统,此例程是移植于 LPC-2148 上的应用,不同于一般的 Porting 其最主要是加入了支援 OS_View 观察器功能
💻 H
📖 第 1 页 / 共 4 页
字号:
__REG32 DATA  : 8;
__REG32       :24;
} __i2dat_bits;

/* I2C slave address register */
typedef struct{
__REG32 GC    : 1;
__REG32 ADDR  : 7;
__REG32       :24;
} __i2adr_bits;

/* I2C scl duty cycle register */
typedef struct{
__REG32 COUNT  :16;
__REG32        :16;
} __i2scl_bits;


/* SPI control register */
typedef struct{
__REG32       : 3;
__REG32 CPHA  : 1;
__REG32 CPOL  : 1;
__REG32 MSTR  : 1;
__REG32 LSBF  : 1;
__REG32 SPIE  : 1;
__REG32       :24;
} __spcr_bits;

/* SPI status register */
typedef struct{
__REG32       : 3;
__REG32 ABRT  : 1;
__REG32 MODF  : 1;
__REG32 ROVR  : 1;
__REG32 WCOL  : 1;
__REG32 SPIF  : 1;
__REG32       :24;
} __spsr_bits;

/* SPI data register */
typedef struct{
__REG32 DATA  : 8;
__REG32       :24;
} __spdr_bits;

/* SPI clock counter register */
typedef struct{
__REG32 COUNTER  : 8;
__REG32          :24;
} __spccr_bits;

/* SPI interrupt register */
typedef struct{
__REG32 SPIINT  : 1;
__REG32         :31;
} __spint_bits;

/* SSP Control Register 0 */
typedef struct{
__REG32 DSS  : 4;
__REG32 FRF  : 2;
__REG32 CPOL : 1;
__REG32 CPHA : 1;
__REG32 SCR  : 8;
__REG32      :16;
} __sspcr0_bits;

/* SSP Control Register 1 */
typedef struct{
__REG32 LBM  : 1;
__REG32 SSE  : 1;
__REG32 MS   : 1;
__REG32 SOD  : 1;
__REG32      :28;
} __sspcr1_bits;

/* SSP Data Register */
typedef struct{
__REG32 DATA :16;
__REG32      :16;
} __sspdr_bits;

/* SSP Status Register */
typedef struct{
__REG32 TFE  : 1;
__REG32 TNF  : 1;
__REG32 RNE  : 1;
__REG32 RFF  : 1;
__REG32 BSY  : 1;
__REG32      :27;
} __sspsr_bits;

/* SSP Clock Prescale Register */
typedef struct{
__REG32 CPSDVSR : 8;
__REG32      	:24;
} __sspcpsr_bits;

/* SSP Interrupt Mask Set/Clear Register */
typedef struct{
__REG32 RORIM  : 1;
__REG32 RTIM   : 1;
__REG32 RXIM   : 1;
__REG32 TXIM   : 1;
__REG32        :28;
} __sspimsc_bits;

/* SSP Raw Interrupt Status Register */
typedef struct{
__REG32 RORRIS  : 1;
__REG32 RTRIS   : 1;
__REG32 RXRIS   : 1;
__REG32 TXRIS   : 1;
__REG32         :28;
} __sspris_bits;

/* SSP Masked Interrupt Status Register */
typedef struct{
__REG32 RORMIS  : 1;
__REG32 RTMIS   : 1;
__REG32 RXMIS   : 1;
__REG32 TXMIS   : 1;
__REG32         :28;
} __sspmis_bits;

/* SSP Interrupt Clear Register */
typedef struct{
__REG32 RORIC  : 1;
__REG32 RTIC   : 1;
__REG32        :30;
} __sspicr_bits;

/* TIMER interrupt register */
typedef struct{
__REG32 MR0INT  : 1;
__REG32 MR1INT  : 1;
__REG32 MR2INT  : 1;
__REG32 MR3INT  : 1;
__REG32 CR0INT  : 1;
__REG32 CR1INT  : 1;
__REG32 CR2INT  : 1;
__REG32 CR3INT  : 1;
__REG32         :24;
} __ir_bits;

/* TIMER control register */
typedef struct{
__REG32 CE  : 1;
__REG32 CR  : 1;
__REG32     :30;
} __tcr_bits;

/* TIMER count control register */
typedef struct{
__REG32 CTM : 2;     //Counter/Timer Mode
__REG32 CIS : 2;     //Count Input Select
__REG32     :28;     
} __ctcr_bits;

/* TIMER match control register */
typedef struct{
__REG32 MR0INT   : 1;
__REG32 MR0RES   : 1;
__REG32 MR0STOP  : 1;
__REG32 MR1INT   : 1;
__REG32 MR1RES   : 1;
__REG32 MR1STOP  : 1;
__REG32 MR2INT   : 1;
__REG32 MR2RES   : 1;
__REG32 MR2STOP  : 1;
__REG32 MR3INT   : 1;
__REG32 MR3RES   : 1;
__REG32 MR3STOP  : 1;
__REG32          :20;
} __mcr_bits;

/* TIMER capture control register */
typedef struct{
__REG32 CAP0RE   : 1;
__REG32 CAP0FE   : 1;
__REG32 CAP0INT  : 1;
__REG32 CAP1RE   : 1;
__REG32 CAP1FE   : 1;
__REG32 CAP1INT  : 1;
__REG32 CAP2RE   : 1;
__REG32 CAP2FE   : 1;
__REG32 CAP2INT  : 1;
__REG32 CAP3RE   : 1;
__REG32 CAP3FE   : 1;
__REG32 CAP3INT  : 1;
__REG32          :20;
} __ccr_bits;

/* TIMER external match register */
typedef struct{
__REG32 EM0   : 1;
__REG32 EM1   : 1;
__REG32 EM2   : 1;
__REG32 EM3   : 1;
__REG32 EMC0  : 2;
__REG32 EMC1  : 2;
__REG32 EMC2  : 2;
__REG32 EMC3  : 2;
__REG32       :20;
} __emr_bits;

/* PWM interrupt register */
typedef struct{
__REG32 MR0INT  : 1;
__REG32 MR1INT  : 1;
__REG32 MR2INT  : 1;
__REG32 MR3INT  : 1;
__REG32         : 4;
__REG32 MR4INT  : 1;
__REG32 MR5INT  : 1;
__REG32 MR6INT  : 1;
__REG32         :21;
} __pwmir_bits;

/* PWM timer control register */
typedef struct{
__REG32 CE     : 1;
__REG32 CR     : 1;
__REG32        : 1;
__REG32 PWMEN  : 1;
__REG32        :28;
} __pwmtcr_bits;

/* PWM match control register */
typedef struct{
__REG32 MR0INT   : 1;
__REG32 MR0RES   : 1;
__REG32 MR0STOP  : 1;
__REG32 MR1INT   : 1;
__REG32 MR1RES   : 1;
__REG32 MR1STOP  : 1;
__REG32 MR2INT   : 1;
__REG32 MR2RES   : 1;
__REG32 MR2STOP  : 1;
__REG32 MR3INT   : 1;
__REG32 MR3RES   : 1;
__REG32 MR3STOP  : 1;
__REG32 MR4INT   : 1;
__REG32 MR4RES   : 1;
__REG32 MR4STOP  : 1;
__REG32 MR5INT   : 1;
__REG32 MR5RES   : 1;
__REG32 MR5STOP  : 1;
__REG32 MR6INT   : 1;
__REG32 MR6RES   : 1;
__REG32 MR6STOP  : 1;
__REG32          :11;
} __pwmmcr_bits;

/* PWM  control register */
typedef struct{
__REG32       : 1;
__REG32 SEL1  : 1;
__REG32 SEL2  : 1;
__REG32 SEL3  : 1;
__REG32 SEL4  : 1;
__REG32 SEL5  : 1;
__REG32 SEL6  : 1;
__REG32       : 2;
__REG32 ENA1  : 1;
__REG32 ENA2  : 1;
__REG32 ENA3  : 1;
__REG32 ENA4  : 1;
__REG32 ENA5  : 1;
__REG32 ENA6  : 1;
__REG32       :17;
} __pwmpcr_bits;

/* PWM latch enable register */
typedef struct{
__REG32 EM0L  : 1;
__REG32 EM1L  : 1;
__REG32 EM2L  : 1;
__REG32 EM3L  : 1;
__REG32 EM4L  : 1;
__REG32 EM5L  : 1;
__REG32 EM6L  : 1;
__REG32       :25;
} __pwmler_bits;

/* A/D control register */
typedef struct{
__REG32 SEL     : 8;
__REG32 CLKDIV  : 8;
__REG32 BURST   : 1;
__REG32 CLKS    : 3;
__REG32         : 1;
__REG32 PDN     : 1;
__REG32 TEST    : 2;
__REG32 START   : 3;
__REG32 EDGE    : 1;
__REG32         : 4;
} __adcr_bits;

/* For backwards compatibility with 4.30A */
#define VVDDA RESULT

/* A/D Global Data Register */
typedef struct{
__REG32         : 6;     
__REG32 RESULT  :10;     
__REG32         : 8;     
__REG32 CHN     : 3;     
__REG32         : 3;     
__REG32 OVERUN  : 1;     
__REG32 DONE    : 1;     
} __adgdr_bits;

/* A/D Global Start Register */
typedef struct{
__REG32        :16;
__REG32 BURST  : 1;
__REG32        : 7;
__REG32 START  : 3;
__REG32 EDGE   : 1;
__REG32        : 4;
} __adgsr_bits;

/* A/D Status Register */
typedef struct{
__REG32 DONE0     : 1;     
__REG32 DONE1     : 1;     
__REG32 DONE2     : 1;     
__REG32 DONE3     : 1;     
__REG32 DONE4     : 1;     
__REG32 DONE5     : 1;     
__REG32 DONE6     : 1;     
__REG32 DONE7     : 1;     
__REG32 OVERRUN0  : 1;     
__REG32 OVERRUN1  : 1;     
__REG32 OVERRUN2  : 1;     
__REG32 OVERRUN3  : 1;     
__REG32 OVERRUN4  : 1;     
__REG32 OVERRUN5  : 1;     
__REG32 OVERRUN6  : 1;     
__REG32 OVERRUN7  : 1;     
__REG32 ADINT     : 1;     
__REG32           :15;     
} __adstat_bits;

/* A/D Intrrupt Enable Register */
typedef struct{
__REG32 ADINTEN0  : 1;     
__REG32 ADINTEN1  : 1;     
__REG32 ADINTEN2  : 1;     
__REG32 ADINTEN3  : 1;     
__REG32 ADINTEN4  : 1;     
__REG32 ADINTEN5  : 1;     
__REG32 ADINTEN6  : 1;     
__REG32 ADINTEN7  : 1;     
__REG32 ADGINTEN  : 1;     
__REG32           :23;     
} __adinten_bits;

/* A/D Data Register */
typedef struct{
__REG32         : 6;     
__REG32 RESULT  :10;     
__REG32         :14;     
__REG32 OVERRUN : 1;     
__REG32 DONE    : 1;     
} __addr_bits;

/* D/A Converter Register */
typedef struct{
__REG32        : 6;
__REG32 VALUE  :10;
__REG32 BIAS   : 1;
__REG32        :15;
} __dacr_bits;

/* RTC interrupt location register */
typedef struct{
__REG32 RTCCIF  : 1;
__REG32 RTCALF  : 1;
__REG32         :30;
} __ilr_bits;

/* RTC clock tick counter register */
typedef struct{
__REG32          : 1;
__REG32 COUNTER  :15;
__REG32          :16;
} __ctc_bits;

/* RTC clock control register */
typedef struct{
__REG32 CLKEN   : 1;
__REG32 CTCRST  : 1;
__REG32 CTTEST  : 2;
__REG32 CLKSRC  : 1;
__REG32         :27;
} __rtcccr_bits;

/* RTC counter increment interrupt register */
typedef struct{
__REG32 IMSEC   : 1;
__REG32 IMMIN   : 1;
__REG32 IMHOUR  : 1;
__REG32 IMDOM   : 1;
__REG32 IMDOW   : 1;
__REG32 IMDOY   : 1;
__REG32 IMMON   : 1;
__REG32 IMYEAR  : 1;
__REG32         :24;
} __ciir_bits;

/* RTC alarm mask register */
typedef struct{
__REG32 AMRSEC   : 1;
__REG32 AMRMIN   : 1;
__REG32 AMRHOUR  : 1;
__REG32 AMRDOM   : 1;
__REG32 AMRDOW   : 1;
__REG32 AMRDOY   : 1;
__REG32 AMRMON   : 1;
__REG32 AMRYEAR  : 1;
__REG32          :24;
} __amr_bits;

/* RTC consolidated time register 0 */
typedef struct{
__REG32 SEC   : 6;
__REG32       : 2;
__REG32 MIN   : 6;
__REG32       : 2;
__REG32 HOUR  : 5;
__REG32       : 3;
__REG32 DOW   : 3;
__REG32       : 5;
} __ctime0_bits;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -