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

📄 s3c2440.h

📁 ucos_ii在mini2440上的移植KEIL编译环境
💻 H
📖 第 1 页 / 共 3 页
字号:
                       
#define GPDCON               (*(volatile unsigned long *) 0x56000030)
#define GPDDAT               (*(volatile unsigned long *) 0x56000034)
#define GPDUP                (*(volatile unsigned long *) 0x56000038)
                       
#define GPECON               (*(volatile unsigned long *) 0x56000040)
#define GPEDAT               (*(volatile unsigned long *) 0x56000044)
#define GPEUP                (*(volatile unsigned long *) 0x56000048)
                       
#define GPFCON               (*(volatile unsigned long *) 0x56000050)
#define GPFDAT               (*(volatile unsigned long *) 0x56000054)
#define GPFUP                (*(volatile unsigned long *) 0x56000058)
                       
#define GPGCON               (*(volatile unsigned long *) 0x56000060)
#define GPGDAT               (*(volatile unsigned long *) 0x56000064)
#define GPGUP                (*(volatile unsigned long *) 0x56000068)
                       
#define GPHCON               (*(volatile unsigned long *) 0x56000070)
#define GPHDAT               (*(volatile unsigned long *) 0x56000074)
#define GPHUP                (*(volatile unsigned long *) 0x56000078)

#define GPJCON               (*(volatile unsigned long *) 0x560000D0)
#define GPJDAT               (*(volatile unsigned long *) 0x560000D4)
#define GPJUP                (*(volatile unsigned long *) 0x560000D8)
                       
#define MISCCR               (*(volatile unsigned long *) 0x56000080)
#define DCLKCON              (*(volatile unsigned long *) 0x56000084)
#define EXTINT0              (*(volatile unsigned long *) 0x56000088)
#define EXTINT1              (*(volatile unsigned long *) 0x5600008C)
#define EXTINT2              (*(volatile unsigned long *) 0x56000090)
#define EINTFLT0             (*(volatile unsigned long *) 0x56000094)
#define EINTFLT1             (*(volatile unsigned long *) 0x56000098)
#define EINTFLT2             (*(volatile unsigned long *) 0x5600009C)
#define EINTFLT3             (*(volatile unsigned long *) 0x560000A0)
#define EINTMASK             (*(volatile unsigned long *) 0x560000A4)
#define EINTPEND             (*(volatile unsigned long *) 0x560000A8)
#define GSTATUS0             (*(volatile unsigned long *) 0x560000AC)
#define GSTATUS1             (*(volatile unsigned long *) 0x560000B0)
#define GSTATUS2             (*(volatile unsigned long *) 0x560000B4)
#define GSTATUS3             (*(volatile unsigned long *) 0x560000B8)
#define GSTATUS4             (*(volatile unsigned long *) 0x560000BC)
#define MSLCON               (*(volatile unsigned long *) 0x560000CC)

// RTC
#ifdef  __BIG_ENDIAN
#define RTCCON               (*(volatile unsigned char *) 0x57000043)
#define TICNT                (*(volatile unsigned char *) 0x57000047)
#define RTCALM               (*(volatile unsigned char *) 0x57000053)
#define ALMSEC               (*(volatile unsigned char *) 0x57000057)
#define ALMMIN               (*(volatile unsigned char *) 0x5700005B)
#define ALMHOUR              (*(volatile unsigned char *) 0x5700005F)
#define ALMDATE              (*(volatile unsigned char *) 0x57000063)
#define ALMMON               (*(volatile unsigned char *) 0x57000067)
#define ALMYEAR              (*(volatile unsigned char *) 0x5700006B)
#define RTCRST               (*(volatile unsigned char *) 0x5700006F)
#define BCDSEC               (*(volatile unsigned char *) 0x57000073)
#define BCDMIN               (*(volatile unsigned char *) 0x57000077)
#define BCDHOUR              (*(volatile unsigned char *) 0x5700007B)
#define BCDDATE              (*(volatile unsigned char *) 0x5700007F)
#define BCDDAY               (*(volatile unsigned char *) 0x57000083)
#define BCDMON               (*(volatile unsigned char *) 0x57000087)
#define BCDYEAR              (*(volatile unsigned char *) 0x5700008B)

#else   //Little Endian
#define RTCCON               (*(volatile unsigned char *) 0x57000040)
#define TICNT                (*(volatile unsigned char *) 0x57000044)
#define RTCALM               (*(volatile unsigned char *) 0x57000050)
#define ALMSEC               (*(volatile unsigned char *) 0x57000054)
#define ALMMIN               (*(volatile unsigned char *) 0x57000058)
#define ALMHOUR              (*(volatile unsigned char *) 0x5700005C)
#define ALMDATE              (*(volatile unsigned char *) 0x57000060)
#define ALMMON               (*(volatile unsigned char *) 0x57000064)
#define ALMYEAR              (*(volatile unsigned char *) 0x57000068)
#define RTCRST               (*(volatile unsigned char *) 0x5700006C)
#define BCDSEC               (*(volatile unsigned char *) 0x57000070)
#define BCDMIN               (*(volatile unsigned char *) 0x57000074)
#define BCDHOUR              (*(volatile unsigned char *) 0x57000078)
#define BCDDATE              (*(volatile unsigned char *) 0x5700007C)
#define BCDDAY               (*(volatile unsigned char *) 0x57000080)
#define BCDMON               (*(volatile unsigned char *) 0x57000084)
#define BCDYEAR              (*(volatile unsigned char *) 0x57000088)
#endif

// A/D Converter
#define ADCCON               (*(volatile unsigned long *) 0x58000000)
#define ADCTSC               (*(volatile unsigned long *) 0x58000004)
#define ADCDLY               (*(volatile unsigned long *) 0x58000008)
#define ADCDAT0              (*(volatile unsigned long *) 0x5800000C)
#define ADCDAT1              (*(volatile unsigned long *) 0x58000010)
#define ADCUPDN              (*(volatile unsigned long *) 0x58000014)          
                       
// SPI         
#define SPCON0               (*(volatile unsigned long *) 0x59000000)
#define SPSTA0               (*(volatile unsigned long *) 0x59000004)
#define SPPIN0               (*(volatile unsigned long *) 0x59000008)
#define SPPRE0               (*(volatile unsigned long *) 0x5900000C)
#define SPTDAT0              (*(volatile unsigned long *) 0x59000010)
#define SPRDAT0              (*(volatile unsigned long *) 0x59000014)

#define SPCON1               (*(volatile unsigned long *) 0x59000020)
#define SPSTA1               (*(volatile unsigned long *) 0x59000024)
#define SPPIN1               (*(volatile unsigned long *) 0x59000028)
#define SPPRE1               (*(volatile unsigned long *) 0x5900002C)
#define SPTDAT1              (*(volatile unsigned long *) 0x59000030)
#define SPRDAT1              (*(volatile unsigned long *) 0x59000034)

// SD Interface
#define SDICON               (*(volatile unsigned long *) 0x5A000000)
#define SDIPRE               (*(volatile unsigned long *) 0x5A000004)
#define SDICARG              (*(volatile unsigned long *) 0x5A000008)
#define SDICCON              (*(volatile unsigned long *) 0x5A00000C)
#define SDICSTA              (*(volatile unsigned long *) 0x5A000010)
#define SDIRSP0              (*(volatile unsigned long *) 0x5A000014)
#define SDIRSP1              (*(volatile unsigned long *) 0x5A000018)
#define SDIRSP2              (*(volatile unsigned long *) 0x5A00001C)
#define SDIRSP3              (*(volatile unsigned long *) 0x5A000020)
#define SDIDTIMER            (*(volatile unsigned long *) 0x5A000024)
#define SDIBSIZE             (*(volatile unsigned long *) 0x5A000028)
#define SDIDCON              (*(volatile unsigned long *) 0x5A00002C)
#define SDIDCNT              (*(volatile unsigned long *) 0x5A000030)
#define SDIDSTA              (*(volatile unsigned long *) 0x5A000034)
#define SDIFSTA              (*(volatile unsigned long *) 0x5A000038)
#define SDIIMSK              (*(volatile unsigned long *) 0x5A00003C)
#define SDIDAT               (*(volatile unsigned char *) 0x5A000040)

#ifdef __BIG_ENDIAN
#undef  SDIDAT
#define SDIDAT               (*(volatile unsigned char *) 0x5A000043)
#endif

// AC97 Audio-CODEC Interface
#define AC_GLBCTRL           (*(volatile unsigned long *) 0x5B000000)
#define AC_GLBSTAT           (*(volatile unsigned long *) 0x5B000004)
#define AC_CODEC_CMD         (*(volatile unsigned long *) 0x5B000008)
#define AC_CODEC_STAT        (*(volatile unsigned long *) 0x5B00000C)
#define AC_PCMADDR           (*(volatile unsigned long *) 0x5B000010)
#define AC_MICADDR           (*(volatile unsigned long *) 0x5B000014)
#define AC_PCMDATA           (*(volatile unsigned long *) 0x5B000018)
#define AC_MICDATA           (*(volatile unsigned long *) 0x5B00001C)

// Interrupt Pending Bit
#define BIT_EINT0            (1 <<  0)
#define BIT_EINT1            (1 <<  1)
#define BIT_EINT2            (1 <<  2)
#define BIT_EINT3            (1 <<  3)
#define BIT_EINT4_7          (1 <<  4)
#define BIT_EINT8_23         (1 <<  5)
#define BIT_CAM              (1 <<  6)
#define BIT_nBAT_FLT         (1 <<  7)
#define BIT_TICK             (1 <<  8)
#define BIT_WDT_AC97         (1 <<  9)
#define BIT_TIMER0           (1 << 10)
#define BIT_TIMER1           (1 << 11)
#define BIT_TIMER2           (1 << 12)
#define BIT_TIMER3           (1 << 13)
#define BIT_TIMER4           (1 << 14)
#define BIT_UART2            (1 << 15)
#define BIT_LCD              (1 << 16)
#define BIT_DMA0             (1 << 17)
#define BIT_DMA1             (1 << 18)
#define BIT_DMA2             (1 << 19)
#define BIT_DMA3             (1 << 20)
#define BIT_SDI              (1 << 21)
#define BIT_SPI0             (1 << 22)
#define BIT_UART1            (1 << 23)
#define BIT_NFCON            (1 << 24)
#define BIT_USBD             (1 << 25)
#define BIT_USBH             (1 << 26)
#define BIT_IIC              (1 << 27)
#define BIT_UART0            (1 << 28)
#define BIT_SPI1             (1 << 29)
#define BIT_RTC              (1 << 30)
#define BIT_ADC              (1 << 31)
#define BIT_ALLMSK           (0xFFFFFFFF)

#define BIT_SUB_RXD0         (1 <<  0)
#define BIT_SUB_TXD0         (1 <<  1)
#define BIT_SUB_ERR0         (1 <<  2)
#define BIT_SUB_RXD1         (1 <<  3)
#define BIT_SUB_TXD1         (1 <<  4)
#define BIT_SUB_ERR1         (1 <<  5)
#define BIT_SUB_RXD2         (1 <<  6)
#define BIT_SUB_TXD2         (1 <<  7)
#define BIT_SUB_ERR2         (1 <<  8)
#define BIT_SUB_TC           (1 <<  9)
#define BIT_SUB_ADC_S        (1 << 10)
#define BIT_SUB_CAM_C        (1 << 11)
#define BIT_SUB_CAM_P        (1 << 12)
#define BIT_SUB_WDT          (1 << 13)
#define BIT_SUB_AC97         (1 << 14)
#define BIT_SUB_ALLMSK       (0x000007FF)

#define ClearPending(bit)    { SRCPND = bit;    \
                               INTPND = INTPND; }

#endif // __S3C2440_H

⌨️ 快捷键说明

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