📄 mc68ez328.h
字号:
#define LXMAX_XM_MASK 0x02f0 /* Bits 0-3 and 10-15 are reserved */
/*
* LCD Screen Height Register
*/
#define LYMAX_ADDR 0xfffffa0a
#define LYMAX WORD_REF(LYMAX_ADDR)
#define LYMAX_YM_MASK 0x01ff /* Bits 9-15 are reserved */
/*
* LCD Cursor X Position Register
*/
#define LCXP_ADDR 0xfffffa18
#define LCXP WORD_REF(LCXP_ADDR)
#define LCXP_CC_MASK 0xc000 /* Cursor Control */
#define LCXP_CC_TRAMSPARENT 0x0000
#define LCXP_CC_BLACK 0x4000
#define LCXP_CC_REVERSED 0x8000
#define LCXP_CC_WHITE 0xc000
#define LCXP_CXP_MASK 0x02ff /* Cursor X position */
/*
* LCD Cursor Y Position Register
*/
#define LCYP_ADDR 0xfffffa1a
#define LCYP WORD_REF(LCYP_ADDR)
#define LCYP_CYP_MASK 0x01ff /* Cursor Y Position */
/*
* LCD Cursor Width and Heigth Register
*/
#define LCWCH_ADDR 0xfffffa1c
#define LCWCH WORD_REF(LCWCH_ADDR)
#define LCWCH_CH_MASK 0x001f /* Cursor Height */
#define LCWCH_CH_SHIFT 0
#define LCWCH_CW_MASK 0x1f00 /* Cursor Width */
#define LCWCH_CW_SHIFT 8
/*
* LCD Blink Control Register
*/
#define LBLKC_ADDR 0xfffffa1f
#define LBLKC BYTE_REF(LBLKC_ADDR)
#define LBLKC_BD_MASK 0x7f /* Blink Divisor */
#define LBLKC_BD_SHIFT 0
#define LBLKC_BKEN 0x80 /* Blink Enabled */
/*
* LCD Panel Interface Configuration Register
*/
#define LPICF_ADDR 0xfffffa20
#define LPICF BYTE_REF(LPICF_ADDR)
#define LPICF_GS_MASK 0x03 /* Gray-Scale Mode */
#define LPICF_GS_BW 0x00
#define LPICF_GS_GRAY_4 0x01
#define LPICF_GS_GRAY_16 0x02
#define LPICF_PBSIZ_MASK 0x0c /* Panel Bus Width */
#define LPICF_PBSIZ_1 0x00
#define LPICF_PBSIZ_2 0x04
#define LPICF_PBSIZ_4 0x08
/*
* LCD Polarity Configuration Register
*/
#define LPOLCF_ADDR 0xfffffa21
#define LPOLCF BYTE_REF(LPOLCF_ADDR)
#define LPOLCF_PIXPOL 0x01 /* Pixel Polarity */
#define LPOLCF_LPPOL 0x02 /* Line Pulse Polarity */
#define LPOLCF_FLMPOL 0x04 /* Frame Marker Polarity */
#define LPOLCF_LCKPOL 0x08 /* LCD Shift Lock Polarity */
/*
* LACD (LCD Alternate Crystal Direction) Rate Control Register
*/
#define LACDRC_ADDR 0xfffffa23
#define LACDRC BYTE_REF(LACDRC_ADDR)
#define LACDRC_ACDSLT 0x80 /* Signal Source Select */
#define LACDRC_ACD_MASK 0x0f /* Alternate Crystal Direction Control */
#define LACDRC_ACD_SHIFT 0
/*
* LCD Pixel Clock Divider Register
*/
#define LPXCD_ADDR 0xfffffa25
#define LPXCD BYTE_REF(LPXCD_ADDR)
#define LPXCD_PCD_MASK 0x3f /* Pixel Clock Divider */
#define LPXCD_PCD_SHIFT 0
/*
* LCD Clocking Control Register
*/
#define LCKCON_ADDR 0xfffffa27
#define LCKCON BYTE_REF(LCKCON_ADDR)
#define LCKCON_DWS_MASK 0x0f /* Display Wait-State */
#define LCKCON_DWS_SHIFT 0
#define LCKCON_DWIDTH 0x40 /* Display Memory Width */
#define LCKCON_LCDON 0x80 /* Enable LCD Controller */
/* '328-compatible definitions */
#define LCKCON_DW_MASK LCKCON_DWS_MASK
#define LCKCON_DW_SHIFT LCKCON_DWS_SHIFT
/*
* LCD Refresh Rate Adjustment Register
*/
#define LRRA_ADDR 0xfffffa29
#define LRRA BYTE_REF(LRRA_ADDR)
/*
* LCD Panning Offset Register
*/
#define LPOSR_ADDR 0xfffffa2d
#define LPOSR BYTE_REF(LPOSR_ADDR)
#define LPOSR_POS_MASK 0x0f /* Pixel Offset Code */
#define LPOSR_POS_SHIFT 0
/*
* LCD Frame Rate Control Modulation Register
*/
#define LFRCM_ADDR 0xfffffa31
#define LFRCM BYTE_REF(LFRCM_ADDR)
#define LFRCM_YMOD_MASK 0x0f /* Vertical Modulation */
#define LFRCM_YMOD_SHIFT 0
#define LFRCM_XMOD_MASK 0xf0 /* Horizontal Modulation */
#define LFRCM_XMOD_SHIFT 4
/*
* LCD Gray Palette Mapping Register
*/
#define LGPMR_ADDR 0xfffffa33
#define LGPMR BYTE_REF(LGPMR_ADDR)
#define LGPMR_G1_MASK 0x0f
#define LGPMR_G1_SHIFT 0
#define LGPMR_G2_MASK 0xf0
#define LGPMR_G2_SHIFT 4
/*
* PWM Contrast Control Register
*/
#define PWMR_ADDR 0xfffffa36
#define PWMR WORD_REF(PWMR_ADDR)
#define PWMR_PW_MASK 0x00ff /* Pulse Width */
#define PWMR_PW_SHIFT 0
#define PWMR_CCPEN 0x0100 /* Contrast Control Enable */
#define PWMR_SRC_MASK 0x0600 /* Input Clock Source */
#define PWMR_SRC_LINE 0x0000 /* Line Pulse */
#define PWMR_SRC_PIXEL 0x0200 /* Pixel Clock */
#define PWMR_SRC_LCD 0x4000 /* LCD clock */
/**********
*
* 0xFFFFFBxx -- Real-Time Clock (RTC)
*
**********/
/*
* RTC Hours Minutes and Seconds Register
*/
#define RTCTIME_ADDR 0xfffffb00
#define RTCTIME LONG_REF(RTCTIME_ADDR)
#define RTCTIME_SECONDS_MASK 0x0000003f /* Seconds */
#define RTCTIME_SECONDS_SHIFT 0
#define RTCTIME_MINUTES_MASK 0x003f0000 /* Minutes */
#define RTCTIME_MINUTES_SHIFT 16
#define RTCTIME_HOURS_MASK 0x1f000000 /* Hours */
#define RTCTIME_HOURS_SHIFT 24
/*
* RTC Alarm Register
*/
#define RTCALRM_ADDR 0xfffffb04
#define RTCALRM LONG_REF(RTCALRM_ADDR)
#define RTCALRM_SECONDS_MASK 0x0000003f /* Seconds */
#define RTCALRM_SECONDS_SHIFT 0
#define RTCALRM_MINUTES_MASK 0x003f0000 /* Minutes */
#define RTCALRM_MINUTES_SHIFT 16
#define RTCALRM_HOURS_MASK 0x1f000000 /* Hours */
#define RTCALRM_HOURS_SHIFT 24
/*
* Watchdog Timer Register
*/
#define WATCHDOG_ADDR 0xfffffb0a
#define WATCHDOG WORD_REF(WATCHDOR_ADDR)
#define WATCHDOG_EN 0x0001 /* Watchdog Enabled */
#define WATCHDOG_ISEL 0x0002 /* Select the watchdog interrupt */
#define WATCHDOG_INTF 0x0080 /* Watchdog interrupt occcured */
#define WATCHDOG_CNT_MASK 0x0300 /* Watchdog Counter */
#define WATCHDOG_CNT_SHIFT 8
/*
* RTC Control Register
*/
#define RTCCTL_ADDR 0xfffffb0c
#define RTCCTL WORD_REF(RTCCTL_ADDR)
#define RTCCTL_XTL 0x0020 /* Crystal Selection */
#define RTCCTL_EN 0x0080 /* RTC Enable */
/* '328-compatible definitions */
#define RTCCTL_384 RTCCTL_XTL
#define RTCCTL_ENABLE RTCCTL_EN
/*
* RTC Interrupt Status Register
*/
#define RTCISR_ADDR 0xfffffb0e
#define RTCISR WORD_REF(RTCISR_ADDR)
#define RTCISR_SW 0x0001 /* Stopwatch timed out */
#define RTCISR_MIN 0x0002 /* 1-minute interrupt has occured */
#define RTCISR_ALM 0x0004 /* Alarm interrupt has occured */
#define RTCISR_DAY 0x0008 /* 24-hour rollover interrupt has occured */
#define RTCISR_1HZ 0x0010 /* 1Hz interrupt has occured */
#define RTCISR_HR 0x0020 /* 1-hour interrupt has occured */
#define RTCISR_SAM0 0x0100 /* 4Hz / 4.6875Hz interrupt has occured */
#define RTCISR_SAM1 0x0200 /* 8Hz / 9.3750Hz interrupt has occured */
#define RTCISR_SAM2 0x0400 /* 16Hz / 18.7500Hz interrupt has occured */
#define RTCISR_SAM3 0x0800 /* 32Hz / 37.5000Hz interrupt has occured */
#define RTCISR_SAM4 0x1000 /* 64Hz / 75.0000Hz interrupt has occured */
#define RTCISR_SAM5 0x2000 /* 128Hz / 150.0000Hz interrupt has occured */
#define RTCISR_SAM6 0x4000 /* 256Hz / 300.0000Hz interrupt has occured */
#define RTCISR_SAM7 0x8000 /* 512Hz / 600.0000Hz interrupt has occured */
/*
* RTC Interrupt Enable Register
*/
#define RTCIENR_ADDR 0xfffffb10
#define RTCIENR WORD_REF(RTCIENR_ADDR)
#define RTCIENR_SW 0x0001 /* Stopwatch interrupt enable */
#define RTCIENR_MIN 0x0002 /* 1-minute interrupt enable */
#define RTCIENR_ALM 0x0004 /* Alarm interrupt enable */
#define RTCIENR_DAY 0x0008 /* 24-hour rollover interrupt enable */
#define RTCIENR_1HZ 0x0010 /* 1Hz interrupt enable */
#define RTCIENR_HR 0x0020 /* 1-hour interrupt enable */
#define RTCIENR_SAM0 0x0100 /* 4Hz / 4.6875Hz interrupt enable */
#define RTCIENR_SAM1 0x0200 /* 8Hz / 9.3750Hz interrupt enable */
#define RTCIENR_SAM2 0x0400 /* 16Hz / 18.7500Hz interrupt enable */
#define RTCIENR_SAM3 0x0800 /* 32Hz / 37.5000Hz interrupt enable */
#define RTCIENR_SAM4 0x1000 /* 64Hz / 75.0000Hz interrupt enable */
#define RTCIENR_SAM5 0x2000 /* 128Hz / 150.0000Hz interrupt enable */
#define RTCIENR_SAM6 0x4000 /* 256Hz / 300.0000Hz interrupt enable */
#define RTCIENR_SAM7 0x8000 /* 512Hz / 600.0000Hz interrupt enable */
/*
* Stopwatch Minutes Register
*/
#define STPWCH_ADDR 0xfffffb12
#define STPWCH WORD_REF(STPWCH)
#define STPWCH_CNT_MASK 0x003f /* Stopwatch countdown value */
#define SPTWCH_CNT_SHIFT 0
/*
* RTC Day Count Register
*/
#define DAYR_ADDR 0xfffffb1a
#define DAYR WORD_REF(DAYR_ADDR)
#define DAYR_DAYS_MASK 0x1ff /* Day Setting */
#define DAYR_DAYS_SHIFT 0
/*
* RTC Day Alarm Register
*/
#define DAYALARM_ADDR 0xfffffb1c
#define DAYALARM WORD_REF(DAYALARM_ADDR)
#define DAYALARM_DAYSAL_MASK 0x01ff /* Day Setting of the Alarm */
#define DAYALARM_DAYSAL_SHIFT 0
/**********
*
* 0xFFFFFCxx -- DRAM Controller
*
**********/
/*
* DRAM Memory Configuration Register
*/
#define DRAMMC_ADDR 0xfffffc00
#define DRAMMC WORD_REF(DRAMMC_ADDR)
#define DRAMMC_ROW12_MASK 0xc000 /* Row address bit for MD12 */
#define DRAMMC_ROW12_PA10 0x0000
#define DRAMMC_ROW12_PA21 0x4000
#define DRAMMC_ROW12_PA23 0x8000
#define DRAMMC_ROW0_MASK 0x3000 /* Row address bit for MD0 */
#define DRAMMC_ROW0_PA11 0x0000
#define DRAMMC_ROW0_PA22 0x1000
#define DRAMMC_ROW0_PA23 0x2000
#define DRAMMC_ROW11 0x0800 /* Row address bit for MD11 PA20/PA22 */
#define DRAMMC_ROW10 0x0400 /* Row address bit for MD10 PA19/PA21 */
#define DRAMMC_ROW9 0x0200 /* Row address bit for MD9 PA9/PA19 */
#define DRAMMC_ROW8 0x0100 /* Row address bit for MD8 PA10/PA20 */
#define DRAMMC_COL10 0x0080 /* Col address bit for MD10 PA11/PA0 */
#define DRAMMC_COL9 0x0040 /* Col address bit for MD9 PA10/PA0 */
#define DRAMMC_COL8 0x0020 /* Col address bit for MD8 PA9/PA0 */
#define DRAMMC_REF_MASK 0x001f /* Reresh Cycle */
#define DRAMMC_REF_SHIFT 0
/*
* DRAM Control Register
*/
#define DRAMC_ADDR 0xfffffc02
#define DRAMC WORD_REF(DRAMC_ADDR)
#define DRAMC_DWE 0x0001 /* DRAM Write Enable */
#define DRAMC_RST 0x0002 /* Reset Burst Refresh Enable */
#define DRAMC_LPR 0x0004 /* Low-Power Refresh Enable */
#define DRAMC_SLW 0x0008 /* Slow RAM */
#define DRAMC_LSP 0x0010 /* Light Sleep */
#define DRAMC_MSW 0x0020 /* Slow Multiplexing */
#define DRAMC_WS_MASK 0x00c0 /* Wait-states */
#define DRAMC_WS_SHIFT 6
#define DRAMC_PGSZ_MASK 0x0300 /* Page Size for fast page mode */
#define DRAMC_PGSZ_SHIFT 8
#define DRAMC_PGSZ_256K 0x0000
#define DRAMC_PGSZ_512K 0x0100
#define DRAMC_PGSZ_1024K 0x0200
#define DRAMC_PGSZ_2048K 0x0300
#define DRAMC_EDO 0x0400 /* EDO DRAM */
#define DRAMC_CLK 0x0800 /* Refresh Timer Clock source select */
#define DRAMC_BC_MASK 0x3000 /* Page Access Clock Cycle (FP mode) */
#define DRAMC_BC_SHIFT 12
#define DRAMC_RM 0x4000 /* Refresh Mode */
#define DRAMC_EN 0x8000 /* DRAM Controller enable */
/**********
*
* 0xFFFFFDxx -- In-Circuit Emulation (ICE)
*
**********/
/*
* ICE Module Address Compare Register
*/
#define ICEMACR_ADDR 0xfffffd00
#define ICEMACR LONG_REF(ICEMACR_ADDR)
/*
* ICE Module Address Mask Register
*/
#define ICEMAMR_ADDR 0xfffffd04
#define ICEMAMR LONG_REF(ICEMAMR_ADDR)
/*
* ICE Module Control Compare Register
*/
#define ICEMCCR_ADDR 0xfffffd08
#define ICEMCCR WORD_REF(ICEMCCR_ADDR)
#define ICEMCCR_PD 0x0001 /* Program/Data Cycle Selection */
#define ICEMCCR_RW 0x0002 /* Read/Write Cycle Selection */
/*
* ICE Module Control Mask Register
*/
#define ICEMCMR_ADDR 0xfffffd0a
#define ICEMCMR WORD_REF(ICEMCMR_ADDR)
#define ICEMCMR_PDM 0x0001 /* Program/Data Cycle Mask */
#define ICEMCMR_RWM 0x0002 /* Read/Write Cycle Mask */
/*
* ICE Module Control Register
*/
#define ICEMCR_ADDR 0xfffffd0c
#define ICEMCR WORD_REF(ICEMCR_ADDR)
#define ICEMCR_CEN 0x0001 /* Compare Enable */
#define ICEMCR_PBEN 0x0002 /* Program Break Enable */
#define ICEMCR_SB 0x0004 /* Single Breakpoint */
#define ICEMCR_HMDIS 0x0008 /* HardMap disable */
#define ICEMCR_BBIEN 0x0010 /* Bus Break Interrupt Enable */
/*
* ICE Module Status Register
*/
#define ICEMSR_ADDR 0xfffffd0e
#define ICEMSR WORD_REF(ICEMSR_ADDR)
#define ICEMSR_EMUEN 0x0001 /* Emulation Enable */
#define ICEMSR_BRKIRQ 0x0002 /* A-Line Vector Fetch Detected */
#define ICEMSR_BBIRQ 0x0004 /* Bus Break Interrupt Detected */
#define ICEMSR_EMIRQ 0x0008 /* EMUIRQ Falling Edge Detected */
#endif /* _MC68EZ328_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -