📄 sa-1101.h
字号:
#define IEEE_Data_C (1<<31) /* Byte count */#define IEEE_Data_Db Fld(9,16) /* Data byte 2 */#define IEEE_Data_Da Fld(9,0) /* Data byte 1 */#define IEEE_Addr_A Fld(8,0) /* forward address transfer byte */#define IEEE_Status_A 0x0100 /* nAutoFd port output status */#define IEEE_Status_E 0x0080 /* nSelectIn port output status */#define IEEE_Status_T 0x0040 /* nStrobe port output status */#define IEEE_Status_I 0x0020 /* nInit port output status */#define IEEE_Status_B 0x0010 /* Busy port inout status */#define IEEE_Status_S 0x0008 /* Select port input status */#define IEEE_Status_K 0x0004 /* nAck port input status */#define IEEE_Status_F 0x0002 /* nFault port input status */#define IEEE_Status_R 0x0001 /* pError port input status */#define IEEE_IntStatus_IntReqDat 0x0100#define IEEE_IntStatus_IntReqEmp 0x0080#define IEEE_IntStatus_IntReqInt 0x0040#define IEEE_IntStatus_IntReqRav 0x0020#define IEEE_IntStatus_IntReqTim 0x0010#define IEEE_IntStatus_RevAddrComp 0x0008#define IEEE_IntStatus_RevDataComp 0x0004#define IEEE_IntStatus_FwdAddrComp 0x0002#define IEEE_IntStatus_FwdDataComp 0x0001#define IEEE_FifoLevels_RevFifoLevel 2#define IEEE_FifoLevels_FwdFifoLevel 1#define IEEE_InitTime_TimValInit Fld(22,0)#define IEEE_TimerStatus_TimValStat Fld(22,0)#define IEEE_ReloadValue_Reload Fld(4,0)#define IEEE_TestControl_RegClk 0x04#define IEEE_TestControl_ClockSelect Fld(2,1)#define IEEE_TestControl_TimerTestModeEn 0x01#define IEEE_TestCtrlIn_PError 0x10#define IEEE_TestCtrlIn_nFault 0x08#define IEEE_TestCtrlIn_nAck 0x04#define IEEE_TestCtrlIn_PSel 0x02#define IEEE_TestCtrlIn_Busy 0x01#endif /* LANGUAGE == C *//* * VGA Controller * * Registers * VideoControl Video Control Register * VgaTiming0 VGA Timing Register 0 * VgaTiming1 VGA Timing Register 1 * VgaTiming2 VGA Timing Register 2 * VgaTiming3 VGA Timing Register 3 * VgaBorder VGA Border Color Register * VgaDBAR VGADMA Base Address Register * VgaDCAR VGADMA Channel Current Address Register * VgaStatus VGA Status Register * VgaInterruptMask VGA Interrupt Mask Register * VgaPalette VGA Palette Registers * DacControl DAC Control Register * VgaTest VGA Controller Test Register */#define _VGA( x ) _SA1101( ( x ) + __VGA_CONTROL )#define _VideoControl _VGA( 0x0000 )#define _VgaTiming0 _VGA( 0x0400 )#define _VgaTiming1 _VGA( 0x0800 )#define _VgaTiming2 _VGA( 0x0c00 )#define _VgaTiming3 _VGA( 0x1000 )#define _VgaBorder _VGA( 0x1400 )#define _VgaDBAR _VGA( 0x1800 )#define _VgaDCAR _VGA( 0x1c00 )#define _VgaStatus _VGA( 0x2000 )#define _VgaInterruptMask _VGA( 0x2400 )#define _VgaPalette _VGA( 0x40000 )#define _DacControl _VGA( 0x3000 )#define _VgaTest _VGA( 0x2c00 )#if (LANGUAGE == C)#define VideoControl (*((volatile Word *) SA1101_p2v (_VideoControl)))#define VgaTiming0 (*((volatile Word *) SA1101_p2v (_VgaTiming0)))#define VgaTiming1 (*((volatile Word *) SA1101_p2v (_VgaTiming1)))#define VgaTiming2 (*((volatile Word *) SA1101_p2v (_VgaTiming2)))#define VgaTiming3 (*((volatile Word *) SA1101_p2v (_VgaTiming3)))#define VgaBorder (*((volatile Word *) SA1101_p2v (_VgaBorder)))#define VgaDBAR (*((volatile Word *) SA1101_p2v (_VgaDBAR)))#define VgaDCAR (*((volatile Word *) SA1101_p2v (_VgaDCAR)))#define VgaStatus (*((volatile Word *) SA1101_p2v (_VgaStatus)))#define VgaInterruptMask (*((volatile Word *) SA1101_p2v (_VgaInterruptMask)))#define VgaPalette (*((volatile Word *) SA1101_p2v (_VgaPalette)))#define DacControl (*((volatile Word *) SA1101_p2v (_DacControl))#define VgaTest (*((volatile Word *) SA1101_p2v (_VgaTest)))#define VideoControl_VgaEn 0x00000000#define VideoControl_BGR 0x00000001#define VideoControl_VCompVal Fld(2,2)#define VideoControl_VgaReq Fld(4,4)#define VideoControl_VBurstL Fld(4,8)#define VideoControl_VMode (1<<12)#define VideoControl_PalRead (1<<13)#define VgaTiming0_PPL Fld(6,2)#define VgaTiming0_HSW Fld(8,8)#define VgaTiming0_HFP Fld(8,16)#define VgaTiming0_HBP Fld(8,24)#define VgaTiming1_LPS Fld(10,0)#define VgaTiming1_VSW Fld(6,10)#define VgaTiming1_VFP Fld(8,16)#define VgaTiming1_VBP Fld(8,24)#define VgaTiming2_IVS 0x01#define VgaTiming2_IHS 0x02#define VgaTiming2_CVS 0x04#define VgaTiming2_CHS 0x08#define VgaTiming3_HBS Fld(8,0)#define VgaTiming3_HBE Fld(8,8)#define VgaTiming3_VBS Fld(8,16)#define VgaTiming3_VBE Fld(8,24)#define VgaBorder_BCOL Fld(24,0)#define VgaStatus_VFUF 0x01#define VgaStatus_VNext 0x02#define VgaStatus_VComp 0x04#define VgaInterruptMask_VFUFMask 0x00#define VgaInterruptMask_VNextMask 0x01#define VgaInterruptMask_VCompMask 0x02#define VgaPalette_R Fld(8,0)#define VgaPalette_G Fld(8,8)#define VgaPalette_B Fld(8,16)#define DacControl_DACON 0x0001#define DacControl_COMPON 0x0002#define DacControl_PEDON 0x0004#define DacControl_RTrim Fld(5,4)#define DacControl_GTrim Fld(5,9)#define DacControl_BTrim Fld(5,14)#define VgaTest_TDAC 0x00#define VgaTest_Datatest Fld(4,1)#define VgaTest_DACTESTDAC 0x10#define VgaTest_DACTESTOUT Fld(3,5)#endif /* LANGUAGE == C *//* * USB Host Interface Controller * * Registers * Revision * Control * CommandStatus * InterruptStatus * InterruptEnable * HCCA * PeriodCurrentED * ControlHeadED * BulkHeadED * BulkCurrentED * DoneHead * FmInterval * FmRemaining * FmNumber * PeriodicStart * LSThreshold * RhDescriptorA * RhDescriptorB * RhStatus * RhPortStatus * USBStatus * USBReset * USTAR * USWER * USRFR * USNFR * USTCSR * USSR * */#define _USB( x ) _SA1101( ( x ) + __USB_CONTROL )#define _Revision _USB( 0x0000 )#define _Control _USB( 0x0888 )#define _CommandStatus _USB( 0x0c00 )#define _InterruptStatus _USB( 0x1000 )#define _InterruptEnable _USB( 0x1400 )#define _HCCA _USB( 0x1800 )#define _PeriodCurrentED _USB( 0x1c00 )#define _ControlHeadED _USB( 0x2000 )#define _BulkHeadED _USB( 0x2800 )#define _BulkCurrentED _USB( 0x2c00 )#define _DoneHead _USB( 0x3000 )#define _FmInterval _USB( 0x3400 )#define _FmRemaining _USB( 0x3800 )#define _FmNumber _USB( 0x3c00 )#define _PeriodicStart _USB( 0x4000 )#define _LSThreshold _USB( 0x4400 )#define _RhDescriptorA _USB( 0x4800 )#define _RhDescriptorB _USB( 0x4c00 )#define _RhStatus _USB( 0x5000 )#define _RhPortStatus _USB( 0x5400 )#define _USBStatus _USB( 0x11800 )#define _USBReset _USB( 0x11c00 )#define _USTAR _USB( 0x10400 )#define _USWER _USB( 0x10800 )#define _USRFR _USB( 0x10c00 )#define _USNFR _USB( 0x11000 )#define _USTCSR _USB( 0x11400 )#define _USSR _USB( 0x11800 )#if (LANGUAGE == C)#define Revision (*((volatile Word *) SA1101_p2v (_Revision)))#define Control (*((volatile Word *) SA1101_p2v (_Control)))#define CommandStatus (*((volatile Word *) SA1101_p2v (_CommandStatus)))#define InterruptStatus (*((volatile Word *) SA1101_p2v (_InterruptStatus)))#define InterruptEnable (*((volatile Word *) SA1101_p2v (_InterruptEnable)))#define HCCA (*((volatile Word *) SA1101_p2v (_HCCA)))#define PeriodCurrentED (*((volatile Word *) SA1101_p2v (_PeriodCurrentED)))#define ControlHeadED (*((volatile Word *) SA1101_p2v (_ControlHeadED)))#define BulkHeadED (*((volatile Word *) SA1101_p2v (_BulkHeadED)))#define BulkCurrentED (*((volatile Word *) SA1101_p2v (_BulkCurrentED)))#define DoneHead (*((volatile Word *) SA1101_p2v (_DoneHead)))#define FmInterval (*((volatile Word *) SA1101_p2v (_FmInterval)))#define FmRemaining (*((volatile Word *) SA1101_p2v (_FmRemaining)))#define FmNumber (*((volatile Word *) SA1101_p2v (_FmNumber)))#define PeriodicStart (*((volatile Word *) SA1101_p2v (_PeriodicStart)))#define LSThreshold (*((volatile Word *) SA1101_p2v (_LSThreshold)))#define RhDescriptorA (*((volatile Word *) SA1101_p2v (_RhDescriptorA)))#define RhDescriptorB (*((volatile Word *) SA1101_p2v (_RhDescriptorB)))#define RhStatus (*((volatile Word *) SA1101_p2v (_RhStatus)))#define RhPortStatus (*((volatile Word *) SA1101_p2v (_RhPortStatus)))#define USBStatus (*((volatile Word *) SA1101_p2v (_USBStatus)))#define USBReset (*((volatile Word *) SA1101_p2v (_USBReset)))#define USTAR (*((volatile Word *) SA1101_p2v (_USTAR)))#define USWER (*((volatile Word *) SA1101_p2v (_USWER)))#define USRFR (*((volatile Word *) SA1101_p2v (_USRFR)))#define USNFR (*((volatile Word *) SA1101_p2v (_USNFR)))#define USTCSR (*((volatile Word *) SA1101_p2v (_USTCSR)))#define USSR (*((volatile Word *) SA1101_p2v (_USSR)))#define USBStatus_IrqHciRmtWkp (1<<7)#define USBStatus_IrqHciBuffAcc (1<<8)#define USBStatus_nIrqHciM (1<<9)#define USBStatus_nHciMFClr (1<<10)#define USBReset_ForceIfReset 0x01#define USBReset_ForceHcReset 0x02#define USBReset_ClkGenReset 0x04#define USTCR_RdBstCntrl Fld(3,0)#define USTCR_ByteEnable Fld(4,3)#define USTCR_WriteEn (1<<7)#define USTCR_FifoCir (1<<8)#define USTCR_TestXferSel (1<<9)#define USTCR_FifoCirAtEnd (1<<10)#define USTCR_nSimScaleDownClk (1<<11)#define USSR_nAppMDEmpty 0x01#define USSR_nAppMDFirst 0x02#define USSR_nAppMDLast 0x04#define USSR_nAppMDFull 0x08#define USSR_nAppMAFull 0x10#define USSR_XferReq 0x20#define USSR_XferEnd 0x40#endif /* LANGUAGE == C *//* * Interrupt Controller * * Registers * INTTEST0 Test register 0 * INTTEST1 Test register 1 * INTENABLE0 Interrupt Enable register 0 * INTENABLE1 Interrupt Enable register 1 * INTPOL0 Interrupt Polarity selection 0 * INTPOL1 Interrupt Polarity selection 1 * INTTSTSEL Interrupt source selection * INTSTATCLR0 Interrupt Status 0 * INTSTATCLR1 Interrupt Status 1 * INTSET0 Interrupt Set 0 * INTSET1 Interrupt Set 1 */#define _INT( x ) _SA1101( ( x ) + __INTERRUPT_CONTROL)#define _INTTEST0 _INT( 0x1000 )#define _INTTEST1 _INT( 0x1400 )#define _INTENABLE0 _INT( 0x2000 )#define _INTENABLE1 _INT( 0x2400 )#define _INTPOL0 _INT( 0x3000 )#define _INTPOL1 _INT( 0x3400 )#define _INTTSTSEL _INT( 0x5000 )#define _INTSTATCLR0 _INT( 0x6000 )#define _INTSTATCLR1 _INT( 0x6400 )#define _INTSET0 _INT( 0x7000 )#define _INTSET1 _INT( 0x7400 )#if ( LANGUAGE == C )#define INTTEST0 (*((volatile Word *) SA1101_p2v (_INTTEST0)))#define INTTEST1 (*((volatile Word *) SA1101_p2v (_INTTEST1)))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -