📄 lpc21xx_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Procyon ARMlib-LPC2100: LPC21xx.h Source File</title><link href="dox.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.6 --><div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>LPC21xx.h</h1><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>00002 <span class="comment"> *</span>00003 <span class="comment"> * $RCSfile: $</span>00004 <span class="comment"> * $Revision: $</span>00005 <span class="comment"> *</span>00006 <span class="comment"> * Header file for Philips LPC21xx ARM Processors </span>00007 <span class="comment"> * Copyright 2004 R O SoftWare</span>00008 <span class="comment"> *</span>00009 <span class="comment"> * No guarantees, warrantees, or promises, implied or otherwise.</span>00010 <span class="comment"> * May be used for hobby or commercial purposes provided copyright</span>00011 <span class="comment"> * notice remains intact.</span>00012 <span class="comment"> *</span>00013 <span class="comment"> *****************************************************************************/</span>00014 <span class="preprocessor">#ifndef INC_LPC21xx_H</span>00015 <span class="preprocessor"></span><span class="preprocessor">#define INC_LPC21xx_H</span>00016 <span class="preprocessor"></span>00017 <span class="preprocessor">#define REG_8 volatile unsigned char</span>00018 <span class="preprocessor"></span><span class="preprocessor">#define REG16 volatile unsigned short</span>00019 <span class="preprocessor"></span><span class="preprocessor">#define REG32 volatile unsigned long</span>00020 <span class="preprocessor"></span>00021 <span class="preprocessor">#include "lpcWD.h"</span>00022 <span class="preprocessor">#include "lpcTMR.h"</span>00023 <span class="preprocessor">#include "lpcUART.h"</span>00024 <span class="preprocessor">#include "lpcI2C.h"</span>00025 <span class="preprocessor">#include "lpcSPI.h"</span>00026 <span class="preprocessor">#include "lpcRTC.h"</span>00027 <span class="preprocessor">#include "lpcGPIO.h"</span>00028 <span class="preprocessor">#include "lpcPIN.h"</span>00029 <span class="preprocessor">#include "lpcADC.h"</span>00030 <span class="preprocessor">#include "lpcSCB.h"</span>00031 <span class="preprocessor">#include "lpcVIC.h"</span>00032 <span class="comment"></span>00033 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>00034 <span class="comment"></span><span class="comment">// Watchdog</span>00035 <span class="preprocessor">#define WD ((wdRegs_t *)0xE0000000)</span>00036 <span class="preprocessor"></span>00037 <span class="comment">// Watchdog Registers</span>00038 <span class="preprocessor">#define WDMOD WD->mod </span><span class="comment">/* Watchdog Mode Register */</span>00039 <span class="preprocessor">#define WDTC WD->tc </span><span class="comment">/* Watchdog Time Constant Register */</span>00040 <span class="preprocessor">#define WDFEED WD->feed </span><span class="comment">/* Watchdog Feed Register */</span>00041 <span class="preprocessor">#define WDTV WD->tv </span><span class="comment">/* Watchdog Time Value Register */</span>00042 <span class="comment"></span>00043 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>00044 <span class="comment"></span><span class="comment">// Timer 0</span>00045 <span class="preprocessor">#define TMR0 ((pwmTmrRegs_t *)0xE0004000)</span>00046 <span class="preprocessor"></span>00047 <span class="comment">// Timer 0 Registers</span>00048 <span class="preprocessor">#define T0IR TMR0->ir </span><span class="comment">/* Interrupt Register */</span>00049 <span class="preprocessor">#define T0TCR TMR0->tcr </span><span class="comment">/* Timer Control Register */</span>00050 <span class="preprocessor">#define T0TC TMR0->tc </span><span class="comment">/* Timer Counter */</span>00051 <span class="preprocessor">#define T0PR TMR0->pr </span><span class="comment">/* Prescale Register */</span>00052 <span class="preprocessor">#define T0PC TMR0->pc </span><span class="comment">/* Prescale Counter Register */</span>00053 <span class="preprocessor">#define T0MCR TMR0->mcr </span><span class="comment">/* Match Control Register */</span>00054 <span class="preprocessor">#define T0MR0 TMR0->mr0 </span><span class="comment">/* Match Register 0 */</span>00055 <span class="preprocessor">#define T0MR1 TMR0->mr1 </span><span class="comment">/* Match Register 1 */</span>00056 <span class="preprocessor">#define T0MR2 TMR0->mr2 </span><span class="comment">/* Match Register 2 */</span>00057 <span class="preprocessor">#define T0MR3 TMR0->mr3 </span><span class="comment">/* Match Register 3 */</span>00058 <span class="preprocessor">#define T0CCR TMR0->ccr </span><span class="comment">/* Capture Control Register */</span>00059 <span class="preprocessor">#define T0CR0 TMR0->cr0 </span><span class="comment">/* Capture Register 0 */</span>00060 <span class="preprocessor">#define T0CR1 TMR0->cr1 </span><span class="comment">/* Capture Register 1 */</span>00061 <span class="preprocessor">#define T0CR2 TMR0->cr2 </span><span class="comment">/* Capture Register 2 */</span>00062 <span class="preprocessor">#define T0CR3 TMR0->cr3 </span><span class="comment">/* Capture Register 3 */</span>00063 <span class="preprocessor">#define T0EMR TMR0->emr </span><span class="comment">/* External Match Register */</span>00064 <span class="comment"></span>00065 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>00066 <span class="comment"></span><span class="comment">// Timer 1</span>00067 <span class="preprocessor">#define TMR1 ((pwmTmrRegs_t *)0xE0008000)</span>00068 <span class="preprocessor"></span>00069 <span class="comment">// Timer 1 Registers</span>00070 <span class="preprocessor">#define T1IR TMR1->ir </span><span class="comment">/* Interrupt Register */</span>00071 <span class="preprocessor">#define T1TCR TMR1->tcr </span><span class="comment">/* Timer Control Register */</span>00072 <span class="preprocessor">#define T1TC TMR1->tc </span><span class="comment">/* Timer Counter */</span>00073 <span class="preprocessor">#define T1PR TMR1->pr </span><span class="comment">/* Prescale Register */</span>00074 <span class="preprocessor">#define T1PC TMR1->pc </span><span class="comment">/* Prescale Counter Register */</span>00075 <span class="preprocessor">#define T1MCR TMR1->mcr </span><span class="comment">/* Match Control Register */</span>00076 <span class="preprocessor">#define T1MR0 TMR1->mr0 </span><span class="comment">/* Match Register 0 */</span>00077 <span class="preprocessor">#define T1MR1 TMR1->mr1 </span><span class="comment">/* Match Register 1 */</span>00078 <span class="preprocessor">#define T1MR2 TMR1->mr2 </span><span class="comment">/* Match Register 2 */</span>00079 <span class="preprocessor">#define T1MR3 TMR1->mr3 </span><span class="comment">/* Match Register 3 */</span>00080 <span class="preprocessor">#define T1CCR TMR1->ccr </span><span class="comment">/* Capture Control Register */</span>00081 <span class="preprocessor">#define T1CR0 TMR1->cr0 </span><span class="comment">/* Capture Register 0 */</span>00082 <span class="preprocessor">#define T1CR1 TMR1->cr1 </span><span class="comment">/* Capture Register 1 */</span>00083 <span class="preprocessor">#define T1CR2 TMR1->cr2 </span><span class="comment">/* Capture Register 2 */</span>00084 <span class="preprocessor">#define T1CR3 TMR1->cr3 </span><span class="comment">/* Capture Register 3 */</span>00085 <span class="preprocessor">#define T1EMR TMR1->emr </span><span class="comment">/* External Match Register */</span>00086 <span class="comment"></span>00087 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>00088 <span class="comment"></span><span class="comment">// Pulse Width Modulator (PWM)</span>00089 <span class="preprocessor">#define PWM ((pwmTmrRegs_t *)0xE0014000)</span>00090 <span class="preprocessor"></span>00091 <span class="comment">// PWM Registers</span>00092 <span class="preprocessor">#define PWMIR PWM->ir </span><span class="comment">/* Interrupt Register */</span>00093 <span class="preprocessor">#define PWMTCR PWM->tcr </span><span class="comment">/* Timer Control Register */</span>00094 <span class="preprocessor">#define PWMTC PWM->tc </span><span class="comment">/* Timer Counter */</span>00095 <span class="preprocessor">#define PWMPR PWM->pr </span><span class="comment">/* Prescale Register */</span>00096 <span class="preprocessor">#define PWMPC PWM->pc </span><span class="comment">/* Prescale Counter Register */</span>00097 <span class="preprocessor">#define PWMMCR PWM->mcr </span><span class="comment">/* Match Control Register */</span>00098 <span class="preprocessor">#define PWMMR0 PWM->mr0 </span><span class="comment">/* Match Register 0 */</span>00099 <span class="preprocessor">#define PWMMR1 PWM->mr1 </span><span class="comment">/* Match Register 1 */</span>00100 <span class="preprocessor">#define PWMMR2 PWM->mr2 </span><span class="comment">/* Match Register 2 */</span>00101 <span class="preprocessor">#define PWMMR3 PWM->mr3 </span><span class="comment">/* Match Register 3 */</span>00102 <span class="preprocessor">#define PWMMR4 PWM->mr4 </span><span class="comment">/* Match Register 4 */</span>00103 <span class="preprocessor">#define PWMMR5 PWM->mr5 </span><span class="comment">/* Match Register 5 */</span>00104 <span class="preprocessor">#define PWMMR6 PWM->mr6 </span><span class="comment">/* Match Register 6 */</span>00105 <span class="preprocessor">#define PWMPCR PWM->pcr </span><span class="comment">/* Control Register */</span>00106 <span class="preprocessor">#define PWMLER PWM->ler </span><span class="comment">/* Latch Enable Register */</span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -