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

📄 ep7312.h

📁 ep7312 蜂鸣器源码
💻 H
字号:
/**************************************************************************
*                                                                         *
*   PROJECT     : ARM port for UCOS-II                                    *
*                                                                         *
*   MODULE      : EP7312.h                                                *
*                                                                         *
*   AUTHOR      : Michael Anburaj                                         *
*                 URL  : http://geocities.com/michaelanburaj/             *
*                 EMAIL: michaelanburaj@hotmail.com                       *
*                                                                         *
*   PROCESSOR   : EP7312 (32 bit ARM720T RISC core from CIRRUS Logic)     *
*                                                                         *
*   IDE         : SDT 2.51 & ADS 1.2                                      *
*                                                                         *
*   DESCRIPTION :                                                         *
*   EP7312 processor register definition header file.                     *
*                                                                         *
**************************************************************************/


#ifndef __EP7312_H__
#define __EP7312_H__


#include "frmwrk.h"


#ifdef __cplusplus
extern "C" {
#endif


/* ********************************************************************* */
/* Module configuration */


/* ********************************************************************* */
/* Interface macro & data definition */

/* ID */
#define rUNIQID         (*(volatile U32 *)0x80002440)
#define rRANDID0        (*(volatile U32 *)0x80002700)
#define rRANDID1        (*(volatile U32 *)0x80002704)
#define rRANDID2        (*(volatile U32 *)0x80002708)
#define rRANDID3        (*(volatile U32 *)0x8000270c)

/* System */
#define rSYSCON1        (*(volatile U32 *)0x80000100)
#define rSYSFLG1        (*(volatile U32 *)0x80000140)
#define rSYSCON2        (*(volatile U32 *)0x80001100)
#define rSYSFLG2        (*(volatile U32 *)0x80001140)
#define rSYSCON3        (*(volatile U32 *)0x80002200)
#define rSTFCLR         (*(volatile U32 *)0x800005c0)
#define rHALT           (*(volatile U32 *)0x80000800)
#define rSTDBY          (*(volatile U32 *)0x80000840)
#define rPLLW           (*(volatile U32 *)0x80002610)
#define rPLLR           (*(volatile U32 *)0x8000a5a8)

/* Memory */
#define rMEMCFG1        (*(volatile U32 *)0x80000180)
#define rMEMCFG2        (*(volatile U32 *)0x800001c0)
#define rSDCONF         (*(volatile U32 *)0x80002300)
#define rSDRFPR         (*(volatile U32 *)0x80002340)

/* Interrupt */
#define rINTSR1         (*(volatile U32 *)0x80000240)
#define rINTMR1         (*(volatile U32 *)0x80000280)
#define rINTSR2         (*(volatile U32 *)0x80001240)
#define rINTMR2         (*(volatile U32 *)0x80001280)
#define rINTSR3         (*(volatile U32 *)0x80002240)
#define rINTMR3         (*(volatile U32 *)0x80002280)

/* EOI */
#define rBLEOI          (*(volatile U32 *)0x80000600)
#define rMCEOI          (*(volatile U32 *)0x80000640)
#define rTEOI           (*(volatile U32 *)0x80000680)
#define rTC1EOI         (*(volatile U32 *)0x800006c0)
#define rTC2EOI         (*(volatile U32 *)0x80000700)
#define rRTCEOI         (*(volatile U32 *)0x80000740)
#define rUMSEOI         (*(volatile U32 *)0x80000780)
#define rCOEOI          (*(volatile U32 *)0x800007c0)
#define rKBDEOI         (*(volatile U32 *)0x80001700)

/* GPIO */
#ifdef __BIG_ENDIAN
#define rPADR           (*(volatile U8 *)0x80000003)
#define rPADDR          (*(volatile U8 *)0x80000043)
#define rPBDR           (*(volatile U8 *)0x80000002)
#define rPBDDR          (*(volatile U8 *)0x80000042)
#define rPDDR           (*(volatile U8 *)0x80000000)
#define rPDDDR          (*(volatile U8 *)0x80000040)
#define rPEDR           (*(volatile U8 *)0x80000083)
#define rPEDDR          (*(volatile U8 *)0x800000c3)
#else
#define rPADR           (*(volatile U8 *)0x80000000)
#define rPADDR          (*(volatile U8 *)0x80000040)
#define rPBDR           (*(volatile U8 *)0x80000001)
#define rPBDDR          (*(volatile U8 *)0x80000041)
#define rPDDR           (*(volatile U8 *)0x80000003)
#define rPDDDR          (*(volatile U8 *)0x80000043)
#define rPEDR           (*(volatile U8 *)0x80000080)
#define rPEDDR          (*(volatile U8 *)0x800000c0)
#endif

/* UART */
#define rUARTDR1        (*(volatile U32 *)0x80000480) 
#define rUBRLCR1        (*(volatile U32 *)0x800004c0)
#define rUARTDR2        (*(volatile U32 *)0x80001480)
#define rUBRLCR2        (*(volatile U32 *)0x800014c0)

/* SSI */
#define rSYNCIO         (*(volatile U32 *)0x80000500)
#define rSS2DR          (*(volatile U32 *)0x80001500)
#define rSRXEOF         (*(volatile U32 *)0x80001600)
#define rSS2POP         (*(volatile U32 *)0x800016c0)

/* Timer */
#define rTC1D           (*(volatile U32 *)0x80000300)
#define rTC2D           (*(volatile U32 *)0x80000340)

/* LCD */
#define rLCDCON         (*(volatile U32 *)0x800002c0)
#define rPALLSW         (*(volatile U32 *)0x80000540)
#define rPALMSW         (*(volatile U32 *)0x80000580)
#define rFBADDR         (*(volatile U32 *)0x80001000)

/* RTC */
#define rRTCDR          (*(volatile U32 *)0x80000380)
#define rRTCMR          (*(volatile U32 *)0x800003c0)

/* DAI */
#define rDAIR           (*(volatile U32 *)0x80002000)
#define rDAIR0          (*(volatile U32 *)0x80002040)
#define rDAIDR1         (*(volatile U32 *)0x80002080)
#define rDAIDR2         (*(volatile U32 *)0x800020c0)
#define rDAISR          (*(volatile U32 *)0x80002100)
#define rDAI64Fs        (*(volatile U32 *)0x80002600)

/* others */
#define rPMPCON         (*(volatile U32 *)0x80000400)
#define rCODR           (*(volatile U32 *)0x80000440)
#define rLEDFLSH        (*(volatile U32 *)0x800022c0)

/* NAND Flash */
#define rEE_SADDR       (*(volatile U32 *)(EE_SADDR + 0x0000))

/* CDK238 Specific registers */
/* Ethernet Controller, CS8900A */
#define rETHRxTx0       (*(volatile U16 *)(ETH_BADDR + ETH_IOBADDR + 0x0000))
#define rETHRxTx1       (*(volatile U16 *)(ETH_BADDR + ETH_IOBADDR + 0x0002))
#define rETHTxCMD       (*(volatile U16 *)(ETH_BADDR + ETH_IOBADDR + 0x0004))
#define rETHTxLEN       (*(volatile U16 *)(ETH_BADDR + ETH_IOBADDR + 0x0006))
#define rETHINTSTATQ    (*(volatile U16 *)(ETH_BADDR + ETH_IOBADDR + 0x0008))
#define rETHPKTPGPTR    (*(volatile U16 *)(ETH_BADDR + ETH_IOBADDR + 0x000a))
#define rETHPKTPGDATA0  (*(volatile U16 *)(ETH_BADDR + ETH_IOBADDR + 0x000c))
#define rETHPKTPGDATA1  (*(volatile U16 *)(ETH_BADDR + ETH_IOBADDR + 0x000e))


/* Soft Vector Locations */
/* Exceptions */
#define pISR_RESET      (*(U32 *)(ISR_BADDR+0x00))
#define pISR_UNDEF      (*(U32 *)(ISR_BADDR+0x04))
#define pISR_SWI        (*(U32 *)(ISR_BADDR+0x08))
#define pISR_PABORT     (*(U32 *)(ISR_BADDR+0x0c))
#define pISR_DABORT     (*(U32 *)(ISR_BADDR+0x10))
#define pISR_RESERVED   (*(U32 *)(ISR_BADDR+0x14))
#define pISR_IRQ        (*(U32 *)(ISR_BADDR+0x18))
#define pISR_FIQ        (*(U32 *)(ISR_BADDR+0x1c))

/* HW interrupts */
#define pISR_EXTFIQ     (*(U32 *)(ISR_BADDR+0x20))
#define pISR_BLINT      (*(U32 *)(ISR_BADDR+0x24))
#define pISR_WEINT      (*(U32 *)(ISR_BADDR+0x28))
#define pISR_MCINT      (*(U32 *)(ISR_BADDR+0x2c))
#define pISR_CSINT      (*(U32 *)(ISR_BADDR+0x30))
#define pISR_EINT1      (*(U32 *)(ISR_BADDR+0x34))
#define pISR_EINT2      (*(U32 *)(ISR_BADDR+0x38))
#define pISR_EINT3      (*(U32 *)(ISR_BADDR+0x3c))
#define pISR_TC1OI      (*(U32 *)(ISR_BADDR+0x40))
#define pISR_TC2OI      (*(U32 *)(ISR_BADDR+0x44))
#define pISR_RTCMI      (*(U32 *)(ISR_BADDR+0x48))
#define pISR_TINT       (*(U32 *)(ISR_BADDR+0x4c))
#define pISR_UTXINT1    (*(U32 *)(ISR_BADDR+0x50))
#define pISR_URXINT1    (*(U32 *)(ISR_BADDR+0x54))
#define pISR_UMSINT     (*(U32 *)(ISR_BADDR+0x58))
#define pISR_SSEOTI     (*(U32 *)(ISR_BADDR+0x5c))
#define pISR_KBDINT     (*(U32 *)(ISR_BADDR+0x60))
#define pISR_SS2RX      (*(U32 *)(ISR_BADDR+0x64))
#define pISR_SS2TX      (*(U32 *)(ISR_BADDR+0x68))
#define pISR_UTXINT2    (*(U32 *)(ISR_BADDR+0x6c))
#define pISR_URXINT2    (*(U32 *)(ISR_BADDR+0x70))
#define pISR_DAIINT     (*(U32 *)(ISR_BADDR+0x74))


/* Bit Definitions */
/* INTSR1/INTMR1 */
#define BIT_EXTFIQ      (1<<0)
#define BIT_BLINT       (1<<1)
#define BIT_WEINT       (1<<2)
#define BIT_MCINT       (1<<3)
#define BIT_CSINT       (1<<4)
#define BIT_EINT1       (1<<5)
#define BIT_EINT2       (1<<6)
#define BIT_EINT3       (1<<7)
#define BIT_TC1OI       (1<<8)
#define BIT_TC2OI       (1<<9)
#define BIT_RTCMI       (1<<10)
#define BIT_TINT        (1<<11)
#define BIT_UTXINT1     (1<<12)
#define BIT_URXINT1     (1<<13)
#define BIT_UMSINT      (1<<14)
#define BIT_SSEOTI      (1<<15)

/* INTSR2/INTMR2 */
#define BIT_KBDINT      (1<<0)
#define BIT_SS2RX       (1<<1)
#define BIT_SS2TX       (1<<2)
#define BIT_UTXINT2     (1<<12)
#define BIT_URXINT2     (1<<13)

/* INTSR3/INTMR3 */
#define BIT_DAIINT      (1<<0)

/* SYSCON1 */
#define BIT_TC1M        (1<<4)
#define BIT_TC1S        (1<<5)
#define BIT_TC2M        (1<<6)
#define BIT_TC2S        (1<<7)
#define BIT_UART1EN     (1<<8)
#define BIT_BZTOG       (1<<9)
#define BIT_BZMOD       (1<<10)
#define BIT_DBGEN       (1<<11)
#define BIT_LCDEN       (1<<12)
#define BIT_CDENTX      (1<<13)
#define BIT_CDENRX      (1<<14)
#define BIT_SIREN       (1<<15)
#define BIT_EXCKEN      (1<<18)
#define BIT_WAKEDIS     (1<<19)
#define BIT_IRTXM       (1<<20)

/* SYSCON2 */
#define BIT_UART2EN     (1<<8)

/* LCDCON */
#define BIT_GSEN        (1<<30)
#define BIT_GSMD        (1<<31)

/* ARM modes */
#define USERMODE        0x10
#define FIQMODE         0x11
#define IRQMODE         0x12
#define SVCMODE         0x13
#define ABORTMODE       0x17
#define UNDEFMODE       0x1b
#define MODEMASK        0x1f
#define NOINT           0xc0


/* ********************************************************************* */
/* Interface function definition */


/* ********************************************************************* */

#ifdef __cplusplus
}
#endif

#endif /*__EP7312_H__*/

⌨️ 快捷键说明

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