📄 mcf532x_ccm.h
字号:
/*
* File: mcf532x_ccm.h
* Purpose: Register and bit definitions for the MCF532x
*
* Notes:
*
*/
#ifndef __MCF532X_CCM_H__
#define __MCF532X_CCM_H__
/*********************************************************************
*
* Chip Configuration Module (CCM)
*
*********************************************************************/
/* Register read/write macros */
#define MCF_CCM_CCR (*(vuint16 *)(0xFC0A0004))
#define MCF_CCM_RCON (*(vuint16 *)(0xFC0A0008))
#define MCF_CCM_CIR (*(vuint16 *)(0xFC0A000A))
#define MCF_CCM_MISCCR (*(vuint16 *)(0xFC0A0010))
#define MCF_CCM_CDR (*(vuint16 *)(0xFC0A0012))
#define MCF_CCM_UHCSR (*(vuint16 *)(0xFC0A0014))
#define MCF_CCM_UOCSR (*(vuint16 *)(0xFC0A0016))
/* Bit definitions and macros for MCF_CCM_CCR */
#define MCF_CCM_CCR_RESERVED (0x0001)
#define MCF_CCM_CCR_PLL_MODE (0x0003)
#define MCF_CCM_CCR_OSC_MODE (0x0005)
#define MCF_CCM_CCR_BOOTPS(x) (((x)&0x0003)<<3|0x0001)
#define MCF_CCM_CCR_LOAD (0x0021)
#define MCF_CCM_CCR_LIMP (0x0041)
#define MCF_CCM_CCR_CSC(x) (((x)&0x0003)<<8|0x0001)
/* Bit definitions and macros for MCF_CCM_RCON */
#define MCF_CCM_RCON_RESERVED (0x0001)
#define MCF_CCM_RCON_PLL_MODE (0x0003)
#define MCF_CCM_RCON_OSC_MODE (0x0005)
#define MCF_CCM_RCON_BOOTPS(x) (((x)&0x0003)<<3|0x0001)
#define MCF_CCM_RCON_LOAD (0x0021)
#define MCF_CCM_RCON_LIMP (0x0041)
#define MCF_CCM_RCON_CSC(x) (((x)&0x0003)<<8|0x0001)
/* Bit definitions and macros for MCF_CCM_CIR */
#define MCF_CCM_CIR_PRN(x) (((x)&0x003F)<<0)
#define MCF_CCM_CIR_PIN(x) (((x)&0x03FF)<<6)
/* Bit definitions and macros for MCF_CCM_MISCCR */
#define MCF_CCM_MISCCR_USBSRC (0x0001)
#define MCF_CCM_MISCCR_USBDIV (0x0002)
#define MCF_CCM_MISCCR_SSI_SRC (0x0010)
#define MCF_CCM_MISCCR_TIM_DMA (0x0020)
#define MCF_CCM_MISCCR_SSI_PUS (0x0040)
#define MCF_CCM_MISCCR_SSI_PUE (0x0080)
#define MCF_CCM_MISCCR_LCD_CHEN (0x0100)
#define MCF_CCM_MISCCR_LIMP (0x1000)
#define MCF_CCM_MISCCR_PLL_LOCK (0x2000)
/* Bit definitions and macros for MCF_CCM_CDR */
#define MCF_CCM_CDR_SSIDIV(x) (((x)&0x000F)<<0)
#define MCF_CCM_CDR_LPDIV(x) (((x)&0x000F)<<8)
/* Bit definitions and macros for MCF_CCM_UHCSR */
#define MCF_CCM_UHCSR_XPDE (0x0001)
#define MCF_CCM_UHCSR_UHMIE (0x0002)
#define MCF_CCM_UHCSR_WKUP (0x0004)
#define MCF_CCM_UHCSR_PORTIND(x) (((x)&0x0003)<<14)
/* Bit definitions and macros for MCF_CCM_UOCSR */
#define MCF_CCM_UOCSR_XPDE (0x0001)
#define MCF_CCM_UOCSR_UOMIE (0x0002)
#define MCF_CCM_UOCSR_WKUP (0x0004)
#define MCF_CCM_UOCSR_PWRFLT (0x0008)
#define MCF_CCM_UOCSR_SEND (0x0010)
#define MCF_CCM_UOCSR_VVLD (0x0020)
#define MCF_CCM_UOCSR_BVLD (0x0040)
#define MCF_CCM_UOCSR_AVLD (0x0080)
#define MCF_CCM_UOCSR_DPPU (0x0100)
#define MCF_CCM_UOCSR_DCR_VBUS (0x0200)
#define MCF_CCM_UOCSR_CRG_VBUS (0x0400)
#define MCF_CCM_UOCSR_DRV_VBUS (0x0800)
#define MCF_CCM_UOCSR_DMPD (0x1000)
#define MCF_CCM_UOCSR_DPPD (0x2000)
#define MCF_CCM_UOCSR_PORTIND(x) (((x)&0x0003)<<14)
/********************************************************************/
#endif /* __MCF532X_CCM_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -