📄 mb8x.h
字号:
#define MB8X_UART_2_BASE 0xfffe2000#define MB8X_UART_3_BASE 0xfff50000#define MB8X_UART_4_BASE 0xfff51000#define MB8X_UART_5_BASE 0xfff43000#define MB8X_UART_6_BASE 0xfff44000#define MB8X_UART_SIZE 0x30#define MB8X_UART_RHR 0x00#define MB8X_UART_THR 0x00#define MB8X_UART_IER 0x04#define MB8X_UART_DLH 0x04#define MB8X_UART_IIR 0x08#define MB8X_UART_FCR 0x08#define MB8X_UART_EFR 0x08#define MB8X_UART_LCR 0x0C#define MB8X_UART_MCR 0x10#define MB8X_UART_XON1 0x10#define MB8X_UART_ADDR1 0x10#define MB8X_UART_LSR 0x14#define MB8X_UART_XON2 0x14#define MB8X_UART_ADDR2 0x14#define MB8X_UART_MSR 0x18#define MB8X_UART_TCR 0x18#define MB8X_UART_XOFF1 0x18#define MB8X_UART_SCR 0x1C#define MB8X_UART_SPR 0x1C#define MB8X_UART_TLR 0x1C#define MB8X_UART_XOFF2 0x1C#define MB8X_UART_DLL 0x20#define MB8X_UART_MDR1 0x20#define MB8X_UART_DLM 0x24#define MB8X_UART_MDR2 0x24#define MB8X_UART_SFLSR 0x28#define MB8X_UART_TXFLL 0x28#define MB8X_UART_RESUME 0x2C#define MB8X_UART_TXFLH 0x2C#define MB8X_UART_SFREGL 0x30#define MB8X_UART_RXFLL 0x30#define MB8X_UART_SFREGH 0x34#define MB8X_UART_RXFLH 0x34#define MB8X_UART_BLR 0x38#define MB8X_UART_UASR 0x38#define MB8X_UART_ACREG 0x3C#define MB8X_UART_DIV1_6 0x3C#define MB8X_UART_SSR 0x44#define MB8X_UART_EBLR 0x48#define MB8X_UART_OSC_12M_SEL 0x4C#define MB8X_UART_MVR 0x50 /* I2C bus interface */#define MB8X_I2C_1_BASE 0xfff56000#define MB8X_I2C_2_BASE 0xfff57000#define MB8X_I2C_SIZE 0x40#define MB8X_I2C_BSR 0x00#define MB8X_I2C_BCR 0x04#define MB8X_I2C_CCR 0x08#define MB8X_I2C_ADR 0x0c#define MB8X_I2C_DAR 0x10#define MB8X_I2C_ECSR 0x14#define MB8X_I2C_BCFR 0x18#define MB8X_I2C_BC2R 0x1c/* Bit definition for Bus Status Register */#define MB8X_I2C_BSR_FBT 0x01#define MB8X_I2C_BSR_GCA 0x02#define MB8X_I2C_BSR_AAS 0x04#define MB8X_I2C_BSR_TRX 0x08#define MB8X_I2C_BSR_LRB 0x10#define MB8X_I2C_BSR_AL 0x20#define MB8X_I2C_BSR_RSC 0x40#define MB8X_I2C_BSR_BB 0x80/* Bit definition for Bus Control Register */#define MB8X_I2C_BCR_INT 0x01#define MB8X_I2C_BCR_INTE 0x02#define MB8X_I2C_BCR_GCAA 0x04#define MB8X_I2C_BCR_ACK 0x08#define MB8X_I2C_BCR_MSS 0x10#define MB8X_I2C_BCR_SCC 0x20#define MB8X_I2C_BCR_BEIE 0x40#define MB8X_I2C_BCR_BER 0x80/* Bit definition for CLOCK Control Register */#define MB8X_I2C_CCR_CS_MASK 0x1f#define MB8X_I2C_CCR_EN 0x20#define MB8X_I2C_CCR_HSM 0x40#define MB8X_I2C_CCR_RESV 0x80/* Bit definition for ADdress Register */#define MB8X_I2C_ADR_MASK 0x7f#define MB8X_I2C_ADR_RESV 0x80/* Bit definition for DAta Register */#define MB8X_I2C_DAR_MASK 0xff/* Bit definition for Two Bus Control Register */#define MB8X_I2C_BC2R_SCLL 0x01#define MB8X_I2C_BC2R_SDAL 0x02#define MB8X_I2C_BC2R_RESV1 0x0c#define MB8X_I2C_BC2R_SCLS 0x10#define MB8X_I2C_BC2R_SDAS 0x20#define MB8X_I2C_BC2R_RESV2 0xc0/* Bit definition for Expension CS Register */#define MB8X_I2C_ECSR_CS_MASK 0x3f#define MB8X_I2C_ECSR_RESV 0xc0/* Bit definition for Bus Clock Frequency Register */#define MB8X_I2C_BCFR_FS_MASK 0x0f#define MB8X_I2C_BCFR_RESV 0xf0/* Serial peripheral interface */#define MB8X_SPI_BASE 0xfff40000#define MB8X_SPI_SPCR 0x00#define MB8X_SPI_SSCR 0x04#define MB8X_SPI_SPDR 0x08#define MB8X_SPI_SPSR 0x0c/* CAN interface *//* MediaLB interface *//* USB EHCI host controller */#define MB8X_EHCI_BASE 0xfff80000#define MB8X_EHCI_HSCAPBASE 0x00#define MB8X_EHCI_HCSPARAMS 0x04#define MB8X_EHCI_HCCPARAMS 0x08#define MB8X_EHCI_USBCMD 0x10#define MB8X_EHCI_USBSTS 0x14#define MB8X_EHCI_USBINTR 0x18#define MB8X_EHCI_FRINDEX 0x1c#define MB8X_EHCI_CTRLDSSEGMENT 0x20#define MB8X_EHCI_PERIODICLISTBASE 0x24#define MB8X_EHCI_ASYNCLISTADDR 0x28#define MB8X_EHCI_CONFIGFFLAG 0x50#define MB8X_EHCI_PORTSC_1 0x54#define MB8X_EHCI_INSNREG00 0x90#define MB8X_EHCI_INSNREG01 0x94#define MB8X_EHCI_INSNREG02 0x98#define MB8X_EHCI_INSNREG03 0x9c#define MB8X_EHCI_INSNREG04 0xa0#define MB8X_EHCI_INSNREG05 0xa4/* USB OHCI host controller */#define MB8X_OHCI_BASE 0xfff81000#define MB8X_OHCI_HCREVISION 0x00#define MB8X_OHCI_HCCONTROL 0x04#define MB8X_OHCI_HCCMDSTATUS 0x08#define MB8X_OHCI_HCINTRSTATUS 0x0c#define MB8X_OHCI_HCINTRENABLE 0x10#define MB8X_OHCI_HCINTRDISABLE 0x14#define MB8X_OHCI_HCHCCA 0x18#define MB8X_OHCI_HCPERIODICCURRENTED 0x1c#define MB8X_OHCI_HCCONTROLHEADED 0x20#define MB8X_OHCI_HCCONTROLCURRENTED 0x24#define MB8X_OHCI_HCBULDHEADED 0x28#define MB8X_OHCI_HCBULKCURRENTED 0x2c#define MB8X_OHCI_HCDONEHEAD 0x30#define MB8X_OHCI_HCFMINTERVAL 0x34#define MB8X_OHCI_HCFRREMAINING 0x38#define MB8X_OHCI_HCFMNUMBER 0x3c#define MB8X_OHCI_HCPERIODICSTART 0x40#define MB8X_OHCI_HCLSTHRESHOLD 0x44#define MB8X_OHCI_HCRHDESCRIPTORA 0x48#define MB8X_OHCI_HCRHDESCRIPTORB 0x4c#define MB8X_OHCI_HCRHSTATUS 0x50#define MB8X_OHCI_HCRHPORTSTATUS 0x54/* USB host controller PHY */#define MB8X_HC_PHY_BASE 0xfff82000#define MB8X_HC_PHY_MODE_SETTING 0x00#define MB8X_HC_PHY_MODE_SETTING1 0x04#define MB8X_HC_PHY_MODE_SETTING2 0x08/* USB function controller *//* IDE host controller *//* Chip Control Module (CCNT) */#define MB8X_CCNT_BASE 0xfff42000#define MB8X_CCNT_CCID 0x00#define MB8X_CCNT_CSRST 0x04#define MB8X_CCNT_CIST 0x10#define MB8X_CCNT_CISTM 0x14#define MB8X_CCNT_CGPIO_IST 0x18#define MB8X_CCNT_CGPIO_ISTM 0x1c#define MB8X_CCNT_CGPIO_IP 0x20#define MB8X_CCNT_CPGPIO_IM 0x24#define MB8X_CCNT_CAXI_BW 0x28#define MB8X_CCNT_CAXI_PS 0x2c#define MB8X_CCNT_CMUX_MD 0x30#define MB8X_CCNT_CEX_PIN_ST 0x34#define MB8X_CCNT_CMLB 0x38#define MB8X_CCNT_CUSB 0x40#define MB8X_CCNT_CDEBUG0 0xe8#define MB8X_CCNT_CDEBUG1 0xec#define MB8X_CCNT_CMSR0 0xf0#define MB8X_CCNT_CMSR1 0xf4/* External interrupt controller */#define MB8X_EIRC_BASE 0xfffe4000#define MB8X_EIRC_SIZE 0x100#define MB8X_EIRC_EIENB 0x00#define MB8X_EIRC_EIREQ 0x04#define MB8X_EIRC_EILVL 0x08#define MB8X_EIRC_EILVL_LOW_LEVEL 0x00#define MB8X_EIRC_EILVL_HI_LEVEL 0x01#define MB8X_EIRC_EILVL_RISING_EDGE 0x02#define MB8X_EIRC_EILVL_FALLING_EDGE 0x03/* SD memory controller *//* SRAM - On-Chip Static RAM */ #define MB8X_SRAM_BASE 0x01000000#define MB8X_SRAM_LENGTH 0x00010000 /* 64K *//* Bit definitions for interrupt enable register */#define MB8X_IER_RHR 0x01#define MB8X_IER_THR 0x02#define MB8X_IER_LS 0x04#define MB8X_IER_MS 0x08#define MB8X_IER_SLEEP 0x10#define MB8X_IER_XOFF 0x20#define MB8X_IER_RTS 0x40#define MB8X_IER_CTS 0x80
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -