JuiceBox Code Lcd Cpu Header

(file: s3c44b0x.h)


 * 1) ifndef __S3C44B0X_H
 * 2) define __S3C44B0X_H

/* CPU register definitions for the Samsung S3C44B0X Assumes little endian mode, with all but the UART TX/RX holding registers as 32 bit words. The RTC regs are probably supposed to be 8 bit, but they seem to work as 32. Read-only registers are not defined as such.

/****** CPU WRAPPER */
 * 1) define syscfg ((uint32_t volatile* const) 0x01c00000) /* SYSCFG (System Configuration) */
 * 2) define ncachbe0 ((uint32_t volatile* const) 0x01c00004) /* NCACHBE0 (Non Cacheable Area 0) */
 * 3) define ncachbe1 ((uint32_t volatile* const) 0x01c00008) /* NCACHBE1 (Non Cacheable Area 1) */
 * 4) define sbuscon ((uint32_t volatile* const) 0x01c40000) /* SBUSCON (System Bus Control) */

/****** MEMORY CONTROLLER */
 * 1) define bwscon ((uint32_t volatile* const) 0x01c80000) /* BWSCON (Bus Width & Wait Status Control) */
 * 2) define bankcon0 ((uint32_t volatile* const) 0x01c80004) /* BANKCON0 (Boot ROM Control) */
 * 3) define bankcon1 ((uint32_t volatile* const) 0x01c80008) /* BANKCON1 (BANK1 Control) */
 * 4) define bankcon2 ((uint32_t volatile* const) 0x01c8000c) /* BANKCON2 (BANK2 Control) */
 * 5) define bankcon3 ((uint32_t volatile* const) 0x01c80010) /* BANKCON3 (BANK3 Control) */
 * 6) define bankcon4 ((uint32_t volatile* const) 0x01c80014) /* BANKCON4 (BANK4 Control) */
 * 7) define bankcon5 ((uint32_t volatile* const) 0x01c80018) /* BANKCON5 (BANK5 Control) */
 * 8) define bankcon6 ((uint32_t volatile* const) 0x01c8001c) /* BANKCON6 (BANK6 Control) */
 * 9) define bankcon7 ((uint32_t volatile* const) 0x01c80020) /* BANKCON7 (BANK7 Control) */
 * 10) define refresh ((uint32_t volatile* const) 0x01c80024) /* REFRESH (DRAM/SDRAM Refresh Control) */
 * 11) define banksize ((uint32_t volatile* const) 0x01c80028) /* BANKSIZE (Flexible Bank Size) */
 * 12) define mrsrb6 ((uint32_t volatile* const) 0x01c8002c) /* MRSRB6 (Mode register set for SDRAM) */
 * 13) define mrsrb7 ((uint32_t volatile* const) 0x01c80030) /* MRSRB7 (Mode register set for SDRAM) */

/****** UART */
 * 1) define ulcon0 ((uint32_t volatile* const) 0x01d00000) /* ULCON0 (UART 0 Line Control) */
 * 2) define ulcon1 ((uint32_t volatile* const) 0x01d04000) /* ULCON1 (UART 1 Line Control) */
 * 3) define ucon0 ((uint32_t volatile* const) 0x01d00004) /* UCON0 (UART 0 Control) */
 * 4) define ucon1 ((uint32_t volatile* const) 0x01d04004) /* UCON1 (UART 1 Control) */
 * 5) define ufcon0 ((uint32_t volatile* const) 0x01d00008) /* UFCON0 (UART 0 FIFO Control) */
 * 6) define ufcon1 ((uint32_t volatile* const) 0x01d04008) /* UFCON1 (UART 1 FIFO Control) */
 * 7) define umcon0 ((uint32_t volatile* const) 0x01d0000c) /* UMCON0 (UART 0 Modem Control) */
 * 8) define umcon1 ((uint32_t volatile* const) 0x01d0400c) /* UMCON1 (UART 1 Modem Control) */
 * 9) define utrstat0 ((uint32_t volatile* const) 0x01d00010) /* UTRSTAT0 (UART 0 Tx/Rx Status) */
 * 10) define utrstat1 ((uint32_t volatile* const) 0x01d04010) /* UTRSTAT1 (UART 1 Tx/Rx Status) */
 * 11) define uerstat0 ((uint32_t volatile* const) 0x01d00014) /* UERSTAT0 (UART 0 Rx Error Status) */
 * 12) define uerstat1 ((uint32_t volatile* const) 0x01d04014) /* UERSTAT1 (UART 1 Rx Error Status) */
 * 13) define ufstat0 ((uint32_t volatile* const) 0x01d00018) /* UFSTAT0 (UART 0 FIFO Status) */
 * 14) define ufstat1 ((uint32_t volatile* const) 0x01d04018) /* UFSTAT1 (UART 1 FIFO Status) */
 * 15) define umstat0 ((uint32_t volatile* const) 0x01d0001c) /* UMSTAT0 (UART 0 Modem Status) */
 * 16) define umstat1 ((uint32_t volatile* const) 0x01d0401c) /* UMSTAT1 (UART 1 Modem Status) */
 * 17) define utxh0 ((uint8_t volatile* const) 0x01d00020) /* UTXH0 (UART 0 Transmission Hold) */
 * 18) define utxh1 ((uint8_t volatile* const) 0x01d04020) /* UTXH1 (UART 1 Transmission Hold) */
 * 19) define urxh0 ((uint8_t volatile* const) 0x01d00024) /* URXH0 (UART 0 Receive Buffer) */
 * 20) define urxh1 ((uint8_t volatile* const) 0x01d04024) /* URXH1 (UART 1 Receive Buffer) */
 * 21) define ubrdiv0 ((uint32_t volatile* const) 0x01d00028) /* UBRDIV0 (UART 0 Baud Rate Divisor) */
 * 22) define ubrdiv1 ((uint32_t volatile* const) 0x01d04028) /* UBRDIV1 (UART 1 Baud Rate Divisor) */

/****** SIO */
 * 1) define siocon ((uint32_t volatile* const) 0x01d14000) /* SIOCON (SIO Control) */
 * 2) define siodat ((uint32_t volatile* const) 0x01d14004) /* SIODAT (SIO Data) */
 * 3) define sbrdr ((uint32_t volatile* const) 0x01d14008) /* SBRDR (SIO Baud Rate Prescaler) */
 * 4) define itvcnt ((uint32_t volatile* const) 0x01d1400c) /* ITVCNT (SIO Interval Counter) */
 * 5) define dcntz ((uint32_t volatile* const) 0x01d14010) /* DCNTZ (SIO DMA Count Zero) */

/****** IIS */
 * 1) define iiscon ((uint32_t volatile* const) 0x01d18000) /* IISCON (IIS Control) */
 * 2) define iismod ((uint32_t volatile* const) 0x01d18004) /* IISMOD (IIS Mode) */
 * 3) define iispsr ((uint32_t volatile* const) 0x01d18008) /* IISPSR (IIS Prescaler) */
 * 4) define iisfifcon ((uint32_t volatile* const) 0x01d1800c) /* IISFIFCON (IIS FIFO Control) */
 * 5) define iisfif ((uint32_t volatile* const) 0x01d18010) /* IISFIF (IIS FIFO Entry) */

/****** I/O PORT */
 * 1) define pcona ((uint32_t volatile* const) 0x01d20000) /* PCONA (Port A Control) */
 * 2) define pdata ((uint32_t volatile* const) 0x01d20004) /* PDATA (Port A Data) */
 * 3) define pconb ((uint32_t volatile* const) 0x01d20008) /* PCONB (Port B Control) */
 * 4) define pdatb ((uint32_t volatile* const) 0x01d2000c) /* PDATB (Port B Data) */
 * 5) define pconc ((uint32_t volatile* const) 0x01d20010) /* PCONC (Port C Control) */
 * 6) define pdatc ((uint32_t volatile* const) 0x01d20014) /* PDATC (Port C Data) */
 * 7) define pupc ((uint32_t volatile* const) 0x01d20018) /* PUPC (Pull-up Control C) */
 * 8) define pcond ((uint32_t volatile* const) 0x01d2001c) /* PCOND (Port D Control) */
 * 9) define pdatd ((uint32_t volatile* const) 0x01d20020) /* PDATD (Port D Data) */
 * 10) define pupd ((uint32_t volatile* const) 0x01d20024) /* PUPD (Pull-up Control D) */
 * 11) define pcone ((uint32_t volatile* const) 0x01d20028) /* PCONE (Port E Control) */
 * 12) define pdate ((uint32_t volatile* const) 0x01d2002c) /* PDATE (Port E Data) */
 * 13) define pupe ((uint32_t volatile* const) 0x01d20030) /* PUPE (Pull-up Control E) */
 * 14) define pconf ((uint32_t volatile* const) 0x01d20034) /* PCONF (Port F Control) */
 * 15) define pdatf ((uint32_t volatile* const) 0x01d20038) /* PDATF (Port F Data) */
 * 16) define pupf ((uint32_t volatile* const) 0x01d2003c) /* PUPF (Pull-up Control F) */
 * 17) define pcong ((uint32_t volatile* const) 0x01d20040) /* PCONG (Port G Control) */
 * 18) define pdatg ((uint32_t volatile* const) 0x01d20044) /* PDATG (Port G Data) */
 * 19) define pupg ((uint32_t volatile* const) 0x01d20048) /* PUPG (Pull-up Control G) */
 * 20) define spucr ((uint32_t volatile* const) 0x01d2004c) /* SPUCR (Special Pull-up) */
 * 21) define extint ((uint32_t volatile* const) 0x01d20050) /* EXTINT (External Interrupt Control) */
 * 22) define extinpnd ((uint32_t volatile* const) 0x01d20054) /* EXTINPND (External Interrupt Pending) */

/****** WATCHDOG TIMER */
 * 1) define wtcon ((uint32_t volatile* const) 0x01d30000) /* WTCON (Watchdog Timer Mode) */
 * 2) define wtdat ((uint32_t volatile* const) 0x01d30004) /* WTDAT (Watchdog Timer Data) */
 * 3) define wtcnt ((uint32_t volatile* const) 0x01d30008) /* WTCNT (Watchdog Timer Count) */

/****** A/D CONVERTER */
 * 1) define adccon ((uint32_t volatile* const) 0x01d40000) /* ADCCON (ADC Control) */
 * 2) define adcpsr ((uint32_t volatile* const) 0x01d40004) /* ADCPSR (ADC Prescaler) */
 * 3) define adcdat ((uint32_t volatile* const) 0x01d40008) /* ADCDAT (Digitized 10 bit Data) */

/****** PWM TIMER */
 * 1) define tcfg0 ((uint32_t volatile* const) 0x01d50000) /* TCFG0 (Timer Configuration) */
 * 2) define tcfg1 ((uint32_t volatile* const) 0x01d50004) /* TCFG1 (Timer Configuration) */
 * 3) define tcon ((uint32_t volatile* const) 0x01d50008) /* TCON (Timer Control) */
 * 4) define tcntb0 ((uint32_t volatile* const) 0x01d5000c) /* TCNTB0 (Timer Count Buffer 0) */
 * 5) define tcmpb0 ((uint32_t volatile* const) 0x01d50010) /* TCMPB0 (Timer Compare Buffer 0) */
 * 6) define tcnto0 ((uint32_t volatile* const) 0x01d50014) /* TCNTO0 (Timer Count Observation 0) */
 * 7) define tcntb1 ((uint32_t volatile* const) 0x01d50018) /* TCNTB1 (Timer Count Buffer 1) */
 * 8) define tcmpb1 ((uint32_t volatile* const) 0x01d5001c) /* TCMPB1 (Timer Compare Buffer 1) */
 * 9) define tcnto1 ((uint32_t volatile* const) 0x01d50020) /* TCNTO1 (Timer Count Observation 1) */
 * 10) define tcntb2 ((uint32_t volatile* const) 0x01d50024) /* TCNTB2 (Timer Count Buffer 2) */
 * 11) define tcmpb2 ((uint32_t volatile* const) 0x01d50028) /* TCMPB2 (Timer Compare Buffer 2) */
 * 12) define tcnto2 ((uint32_t volatile* const) 0x01d5002c) /* TCNTO2 (Timer Count Observation 2) */
 * 13) define tcntb3 ((uint32_t volatile* const) 0x01d50030) /* TCNTB3 (Timer Count Buffer 3) */
 * 14) define tcmpb3 ((uint32_t volatile* const) 0x01d50034) /* TCMPB3 (Timer Compare Buffer 3) */
 * 15) define tcnto3 ((uint32_t volatile* const) 0x01d50038) /* TCNTO3 (Timer Count Observation 3) */
 * 16) define tcntb4 ((uint32_t volatile* const) 0x01d5003c) /* TCNTB4 (Timer Count Buffer 4) */
 * 17) define tcmpb4 ((uint32_t volatile* const) 0x01d50040) /* TCMPB4 (Timer Compare Buffer 4) */
 * 18) define tcnto4 ((uint32_t volatile* const) 0x01d50044) /* TCNTO4 (Timer Count Observation 4) */
 * 19) define tcntb5 ((uint32_t volatile* const) 0x01d50048) /* TCNTB5 (Timer Count Buffer 5) */
 * 20) define tcnto5 ((uint32_t volatile* const) 0x01d5004c) /* TCNTO5 (Timer Count Observation 5) */

/****** IIC */
 * 1) define iiccon ((uint32_t volatile* const) 0x01d60000) /* IICCON (IIC Control) */
 * 2) define iicstat ((uint32_t volatile* const) 0x01d60004) /* IICSTAT (IIC Status) */
 * 3) define iicadd ((uint32_t volatile* const) 0x01d60008) /* IICADD (IIC Address) */
 * 4) define iicds ((uint32_t volatile* const) 0x01d6000c) /* IICDS (IIC Data Shift) */

/****** RTC */ /* The book shows these as 8 bit registers, not 32. Double-check? */
 * 1) define rtccon ((uint32_t volatile* const) 0x01d70040) /* RTCCON (RTC Control) */
 * 2) define rtcalm ((uint32_t volatile* const) 0x01d70050) /* RTCALM (RTC Alarm) */
 * 3) define almsec ((uint32_t volatile* const) 0x01d70054) /* ALMSEC (Alarm Second) */
 * 4) define almmin ((uint32_t volatile* const) 0x01d70058) /* ALMMIN (Alarm Minute) */
 * 5) define almhour ((uint32_t volatile* const) 0x01d7005c) /* ALMHOUR (Alarm Hour) */
 * 6) define almday ((uint32_t volatile* const) 0x01d70060) /* ALMDAY (Alarm Day) */
 * 7) define almmon ((uint32_t volatile* const) 0x01d70064) /* ALMMON (Alarm Month) */
 * 8) define almyear ((uint32_t volatile* const) 0x01d70068) /* ALMYEAR (Alarm Year) */
 * 9) define rtcrst ((uint32_t volatile* const) 0x01d7006c) /* RTCRST (RTC Round Reset) */
 * 10) define bcdsec ((uint32_t volatile* const) 0x01d70070) /* BCDSEC (BCD Second) */
 * 11) define bcdmin ((uint32_t volatile* const) 0x01d70074) /* BCDMIN (BCD Minute) */
 * 12) define bcdhour ((uint32_t volatile* const) 0x01d70078) /* BCDHOUR (BCD Hour) */
 * 13) define bcdday ((uint32_t volatile* const) 0x01d7007c) /* BCDDAY (BCD Day) */
 * 14) define bcddate ((uint32_t volatile* const) 0x01d70080) /* BCDDATE (BCD Date) */
 * 15) define bcdmon ((uint32_t volatile* const) 0x01d70084) /* BCDMON (BCD Month) */
 * 16) define bcdyear ((uint32_t volatile* const) 0x01d70088) /* BCDYEAR (BCD Year) */
 * 17) define ticint ((uint32_t volatile* const) 0x01D7008C) /* TICINT (Tick time count) */

/****** CLOCK & POWER MANAGEMENT */
 * 1) define pllcon ((uint32_t volatile* const) 0x01d80000) /* PLLCON (PLL Control) */
 * 2) define clkcon ((uint32_t volatile* const) 0x01d80004) /* CLKCON (Clock Control) */
 * 3) define clkslow ((uint32_t volatile* const) 0x01d80008) /* CLKSLOW (Slow clock Control) */
 * 4) define locktime ((uint32_t volatile* const) 0x01d8000c) /* LOCKTIME (PLL lock time Counter) */

/****** INTERRUPT CONTROLLER */
 * 1) define intcon ((uint32_t volatile* const) 0x01e00000) /* INTCON (Interrupt Control) */
 * 2) define intpnd ((uint32_t volatile* const) 0x01e00004) /* INTPND (Interrupt Request Status) */
 * 3) define intmod ((uint32_t volatile* const) 0x01e00008) /* INTMOD (Interrupt Mode Control) */
 * 4) define intmsk ((uint32_t volatile* const) 0x01e0000c) /* INTMSK (Interrupt Mask Control) */
 * 5) define i_pslv ((uint32_t volatile* const) 0x01e00010) /* I_PSLV (IRQ Interrupt Previous Slave) */
 * 6) define i_pmst ((uint32_t volatile* const) 0x01e00014) /* I_PMST (IRQ Interrupt Priority Master) */
 * 7) define i_cslv ((uint32_t volatile* const) 0x01e00018) /* I_CSLV (IRQ Interrupt Current Slave) */
 * 8) define i_cmst ((uint32_t volatile* const) 0x01e0001c) /* I_CMST (IRQ Interrupt Current Master) */
 * 9) define i_ispr ((uint32_t volatile* const) 0x01e00020) /* I_ISPR (IRQ Interrupt Pending Status) */
 * 10) define i_ispc ((uint32_t volatile* const) 0x01e00024) /* I_ISPC (IRQ Interrupt Pending Clear) */
 * 11) define f_ispr ((uint32_t volatile* const) 0x01e00038) /* F_ISPR (FIQ Interrupt Pending) */
 * 12) define f_ispc ((uint32_t volatile* const) 0x01e0003c) /* F_ISPC (FIQ Interrupt Pending Clear) */

/****** LCD CONTROLLER */
 * 1) define lcdcon1 ((uint32_t volatile* const) 0x01f00000) /* LCDCON1 (LCD Control 1) */
 * 2) define lcdcon2 ((uint32_t volatile* const) 0x01f00004) /* LCDCON2 (LCD Control 2) */
 * 3) define lcdcon3 ((uint32_t volatile* const) 0x01f00040) /* LCDCON3 (LCD Control 3) */
 * 4) define lcdsaddr1 ((uint32_t volatile* const) 0x01f00008) /* LCDSADDR1 (Frame Upper Buffer Start Address 1) */
 * 5) define lcdsaddr2 ((uint32_t volatile* const) 0x01f0000c) /* LCDSADDR2 (Frame Lower Buffer Start Address 2) */
 * 6) define lcdsaddr3 ((uint32_t volatile* const) 0x01f00010) /* LCDSADDR3 (Virtual Screen Address) */
 * 7) define redlut ((uint32_t volatile* const) 0x01f00014) /* REDLUT (RED Lookup Table) */
 * 8) define greenlut ((uint32_t volatile* const) 0x01f00018) /* GREENLUT (GREEN Lookup Table) */
 * 9) define bluelut ((uint32_t volatile* const) 0x01f0001c) /* BLUELUT (BLUE Lookup Table) */
 * 10) define dp1_2 ((uint32_t volatile* const) 0x01f00020) /* DP1_2 (Dithering Pattern duty 1/2) */
 * 11) define dp4_7 ((uint32_t volatile* const) 0x01f00024) /* DP4_7 (Dithering Pattern duty 4/7) */
 * 12) define dp3_5 ((uint32_t volatile* const) 0x01f00028) /* DP3_5 (Dithering Pattern duty 3/5) */
 * 13) define dp2_3 ((uint32_t volatile* const) 0x01f0002c) /* DP2_3 (Dithering Pattern duty 2/3) */
 * 14) define dp5_7 ((uint32_t volatile* const) 0x01f00030) /* DP5_7 (Dithering Pattern duty 5/7) */
 * 15) define dp3_4 ((uint32_t volatile* const) 0x01f00034) /* DP3_4 (Dithering Pattern duty 3/4) */
 * 16) define dp4_5 ((uint32_t volatile* const) 0x01f00038) /* DP4_5 (Dithering Pattern duty 4/5) */
 * 17) define dp6_7 ((uint32_t volatile* const) 0x01f0003c) /* DP6_7 (Dithering Pattern duty 6/7) */
 * 18) define dithmode ((uint32_t volatile* const) 0x01f00044) /* DITHMODE (Dithering Mode) */

/****** DMA */
 * 1) define zdcon0 ((uint32_t volatile* const) 0x01e80000) /* ZDCON0 (ZDMA0 Control) */
 * 2) define zdisrc0 ((uint32_t volatile* const) 0x01e80004) /* ZDISRC0 (ZDMA 0 Initial Source Address) */
 * 3) define zdides0 ((uint32_t volatile* const) 0x01e80008) /* ZDIDES0 (ZDMA 0 Initial Destination Address) */
 * 4) define zdicnt0 ((uint32_t volatile* const) 0x01e8000c) /* ZDICNT0 (ZDMA 0 Initial Transfer Count) */
 * 5) define zdcsrc0 ((uint32_t volatile* const) 0x01e80010) /* ZDCSRC0 (ZDMA 0 Current Source Address) */
 * 6) define zdcdes0 ((uint32_t volatile* const) 0x01e80014) /* ZDCDES0 (ZDMA 0 Current Destination Address) */
 * 7) define zdccnt0 ((uint32_t volatile* const) 0x01e80018) /* ZDCCNT0 (ZDMA 0 Current Transfer Count) */
 * 8) define zdcon1 ((uint32_t volatile* const) 0x01e80020) /* ZDCON1 (ZDMA 1 Control) */
 * 9) define zdisrc1 ((uint32_t volatile* const) 0x01e80024) /* ZDISRC1 (ZDMA 1 Initial Source Address) */
 * 10) define zdides1 ((uint32_t volatile* const) 0x01e80028) /* ZDIDES1 (ZDMA 1 Initial Destination Address) */
 * 11) define zdicnt1 ((uint32_t volatile* const) 0x01e8002c) /* ZDICNT1 (ZDMA 1 Initial Transfer Count) */
 * 12) define zdcsrc1 ((uint32_t volatile* const) 0x01e80030) /* ZDCSRC1 (ZDMA 1 Current Source Address) */
 * 13) define zdcdes1 ((uint32_t volatile* const) 0x01e80034) /* ZDCDES1 (ZDMA 1 Current Destination Address) */
 * 14) define zdccnt1 ((uint32_t volatile* const) 0x01e80038) /* ZDCCNT1 (ZDMA 1 Current Transfer Count) */
 * 15) define bdcon0 ((uint32_t volatile* const) 0x01f80000) /* BDCON0 (BDMA 0 Control) */
 * 16) define bdisrc0 ((uint32_t volatile* const) 0x01f80004) /* BDISRC0 (BDMA 0 Initial Source Address) */
 * 17) define bdides0 ((uint32_t volatile* const) 0x01f80008) /* BDIDES0 (BDMA 0 Initial Destination Address) */
 * 18) define bdicnt0 ((uint32_t volatile* const) 0x01f8000c) /* BDICNT0 (BDMA 0 Initial Transfer Count) */
 * 19) define bdcsrc0 ((uint32_t volatile* const) 0x01f80010) /* BDCSRC0 (BDMA 0 Current Source Address) */
 * 20) define bdcdes0 ((uint32_t volatile* const) 0x01f80014) /* BDCDES0 (BDMA 0 Current Destination Address) */
 * 21) define bdccnt0 ((uint32_t volatile* const) 0x01f80018) /* BDCCNT0 (BDMA 0 Current Transfer Count) */
 * 22) define bdcon1 ((uint32_t volatile* const) 0x01f80020) /* BDCON1 (BDMA 1 Control) */
 * 23) define bdisrc1 ((uint32_t volatile* const) 0x01f80024) /* BDISRC1 (BDMA 1 Initial Source Address) */
 * 24) define bdides1 ((uint32_t volatile* const) 0x01f80028) /* BDIDES1 (BDMA 1 Initial Destination Address) */
 * 25) define bdicnt1 ((uint32_t volatile* const) 0x01f8002c) /* BDICNT1 (BDMA 1 Initial Transfer Count) */
 * 26) define bdcsrc1 ((uint32_t volatile* const) 0x01f80030) /* BDCSRC1 (BDMA 1 Current Source Address) */
 * 27) define bdcdes1 ((uint32_t volatile* const) 0x01f80034) /* BDCDES1 (BDMA 1 Current Destination Address) */
 * 28) define bdccnt1 ((uint32_t volatile* const) 0x01f80038) /* BDCCNT1 (BDMA 1 Current Transfer Count) */


 * 1) endif