📄 define.h
字号:
//0x00000000, // 600
//0x00000000,
//0x00000000
};
*/
/*
unsigned WData[30]={
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
//0x10
//This sequence output a Wgate puls,the superposition startup wedge and Sgate startup wedge!
0xff2c8000, //0x04389800,
0x80788800, //0xff2c8800
0xff4c8000, //0x04389800,
0x80588800, // 0x0438a800,
//0x485c8000,
//0x02288800,
//0x58828210,
0x00000000,
0x00000000,
0x00000000, //0xc86c0000,
0x00000000, //0x08388800,
0x00000000, //0x04389820,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
//0x00000000,
0x00000000
};
*/
unsigned WData[30]={
0x00030000,
0x01380000,
0x413c9400,
0xd25405c5,
0x02390020,
0x3c6c0100,
0x05380000,
0x413c9520,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
//0x10
0x00020000,
//0x002c0000, //0x04389800,
//0x002c8800, //YTW 2005-9-14
0x80388000,
//0x0239002c, //09032005 Specify by Gary
0x80388810, //09032005 Specify by Gary //ff=08 ff389800
0x002c8010, //0x08388800,
0x002c8000, //0x04389800,
0xff2c8800, //0xdf5459d5,
0x00000000, //0x0439a830,
0x00000000, // 0x0438a800,
0x00000000, //0xc86c0000,
0x00000000, //0x08388800,
0x00000000, //0x04389820,
0x00000000,
//0x00000000,
//0x00000000,
//0x00000000,
//0x00000000,
};
INT16U ZSDTable[5]={
0x8005,
0x8000,
0x0001,
0x0008,
0x8000,
};
#define PowerDCount *(volatile unsigned short *)0x1000a800
#define ClockDivider_0 *(volatile unsigned short *)0x1000a802
#define ClockDivider_1 *(volatile unsigned short *)0x1000a804
//#define PowerManagemenCTRL *(volatile unsigned short *)0x1000a806
#define PowerCTRL_0 *(volatile unsigned short *)0x1000a808
#define PowerCTRL_1 *(volatile unsigned short *)0x1000a80a
#define PowerCTRL_2 *(volatile unsigned short *)0x1000a80c
#define PowerCTRL_3 *(volatile unsigned short *)0x1000a80e
#define DeviceClockCTRL *(volatile unsigned short *)0x1000a810
#define PeriClockCTRL_0 *(volatile unsigned short *)0x1000a812
#define PeriClockCTRL_1 *(volatile unsigned short *)0x1000a814
//The Wgate registor address define
#define DiskFormatCmnd *(volatile unsigned short *)0x10002c00
#define DiskFormatMode *(volatile unsigned short *)0x10002c02
#define DiskFormatStaMask *(volatile unsigned short *)0x10002c04
#define DiskFormatStatus *(volatile unsigned short *)0x10002c06
#define DiskFormatErrMask *(volatile unsigned short *)0x10002c08
#define DiskFormatErr *(volatile unsigned short *)0x10002c0a
#define ECUUnsafeErrMask *(volatile unsigned short *)0x10002c0c
#define ECUUnsafeErr *(volatile unsigned short *)0x10002c0e
//#define DeviceClockCTRL *(volatile unsigned short *)0x10002c10
#define RetryTimeout *(volatile unsigned short *)0x10002c12
#define SeqCurentAddrPointer *(volatile unsigned short *)0x10002c14
#define SequenStartAddr *(volatile unsigned short *)0x10002c16
#define RetryCount *(volatile unsigned short *)0x10002c18
#define WriteCylinAddr *(volatile unsigned int *)0x10002c40
//#define SectorAddr *(volatile unsigned short *)0x10002c44
//#define HeadAddr *(volatile unsigned short *)0x10002c46
//#define SequenAddrStack *(volatile unsigned short *)0x10002c1c
#define LoopContAdjust *(volatile unsigned short *)0x10002c1c
#define LoopCont *(volatile unsigned short *)0x10002c1e
//#define RetryCount *(volatile unsigned short *)0x10002c18
//#define ExtendFieldCount *(volatile unsigned short *)0x10002c20
#define ExtendFieldCount *(volatile unsigned short *)0x10002c20
#define ECCLogMode *(volatile unsigned short *)0x10002c2c
#define PowerControlReg *(volatile unsigned short *)0x10002c32
#define MaxHeadAddr *(volatile unsigned short *)0x10002c34
#define MinHeadAddr *(volatile unsigned short *)0x10002c36
#define MinCylinderAddr *(volatile unsigned short *)0x10002c38
#define MaxCylinderAddr *(volatile unsigned int *)0x10002c3c
#define TargetCylinderAddr *(volatile unsigned int *)0x10002c40
#define TargetSectorAddr *(volatile unsigned short *)0x10002c44
#define TargetHeadAddr *(volatile unsigned short *)0x10002c46
#define SecondSyncMarkMode *(volatile unsigned short *)0x10002c54
#define DFMode2 *(volatile unsigned short *)0x10002c58
#define DFModeCtrl *(volatile unsigned short *)0x10002c5a
#define ReadTotalSignal *(volatile unsigned short *)0x10002c5c
#define DFFIFOReadPoint *(volatile unsigned short *)0x10002d2e
#define DFFIFOWriPoint *(volatile unsigned short *)0x10002d2c
#define DFRetryCount *(volatile unsigned short *)0x10002d20
#define DataPattern_1 *(volatile unsigned short *)0x10002d00
#define DataPattern_0 *(volatile unsigned short *)0x10002d02
#define DataPattern_3 *(volatile unsigned short *)0x10002d04
#define DataPattern_2 *(volatile unsigned short *)0x10002d06
#define DataPattern_5 *(volatile unsigned short *)0x10002d08
#define DataPattern_4 *(volatile unsigned short *)0x10002d0a
//#define DFErrorMask *(volatile unsigned short *)0x10002c08
#define LoopCountNumSector *(volatile unsigned short *)0x10002c1e
#define BufTransMode *(volatile unsigned short *)0x10002c5e
//The HDC interface Registor Initial
#define HDCInterruptMask *(volatile unsigned short *)0x10002800
#define HDCInterrupt *(volatile unsigned short *)0x10002802
#define MPIFStatus *(volatile unsigned short *)0x10002804
#define BlocksReset *(volatile unsigned short *)0x10002806
#define WaitCounter *(volatile unsigned short *)0x1000280a
//The Sail Registor Initial
#define ZSD1_Set *(volatile unsigned short *)0x10002880
#define ZSD0_Set *(volatile unsigned short *)0x10002882
#define ZSD2_Set *(volatile unsigned short *)0x10002886
#define Current_ZSD *(volatile unsigned short *)0x10002890
#define SailCtrl *(volatile unsigned short *)0x10002892
#define Initial_ZSD *(volatile unsigned short *)0x10002894
#define Current_PSN *(volatile unsigned short *)0x10002896
#define Max_ZSD *(volatile unsigned short *)0x10002898
#define Initial_PSN *(volatile unsigned short *)0x1000289a
#define Expect_SSA *(volatile unsigned short *)0x1000289c
#define Max_PSN *(volatile unsigned short *)0x1000289e
#define SAIL_Status *(volatile unsigned short *)0x100028a0
#define Sector_Size *(volatile unsigned short *)0x100028a2
#define ServoGateInCont *(volatile unsigned short *)0x100028a4
#define SailErrorMask *(volatile unsigned short *)0x100028a6
#define IndexWedInterCont *(volatile unsigned short *)0x100028a8
#define ServoGateAlowCont *(volatile unsigned short *)0x100028aa
#define ClockContDivide *(volatile unsigned short *)0x100028ac
#define IndexWedAlowCont *(volatile unsigned short *)0x100028ae
#define ZSDAddressOffset *(volatile unsigned short *)0x100028b2
#define Initial_SSA *(volatile unsigned short *)0x100028b4
#define Current_SSA *(volatile unsigned short *)0x100028b6
#define Max_SSA *(volatile unsigned short *)0x100028ba
//New Setting by 09092005
//Defect Manager Registor Initial
#define DM_SR *(volatile unsigned short *)0x10002950
#define DM_CR *(volatile unsigned short *)0x10002952
#define DefectSKEW *(volatile unsigned short *)0x10002964
//Error Correction Unit Define
#define ECCMode *(volatile unsigned short *)0x10002b02
#define ECCBufferMode *(volatile unsigned short *)0x10002b10
//Buffer Manager Define
#define BufManageCtrl_0 *(volatile unsigned short *)0x10002E00
#define BufManageItuptMask *(volatile unsigned short *)0x10002E04
#define BufManageCtrl_1 *(volatile unsigned short *)0x10002E06
#define BufManageCtrl_2 *(volatile unsigned short *)0x10002E08
#define RefreshPeriod *(volatile unsigned short *)0x10002E0a
#define HostLinkListPoint *(volatile unsigned short *)0x10002E10
#define HostLinkListAddr *(volatile unsigned short *)0x10002E12
#define AWSegmentSize *(volatile unsigned short *)0x10002E20
#define SectorSize *(volatile unsigned short *)0x10002E22
#define HostSegmentSize *(volatile unsigned short *)0x10002E26
#define HosSegmentSecCont *(volatile unsigned short *)0x10002E28
#define AWSegSecCont *(volatile unsigned short *)0x10002E2a
#define DiskSegSecCont *(volatile unsigned short *)0x10002E2e
#define ZSDTablePoint *(volatile unsigned int *)0x10002f0c
#define AWSegTransPoint *(volatile unsigned int *)0x10002f10
#define AWSegStartAddr *(volatile unsigned int *)0x10002f14
#define AWSegEndAddr *(volatile unsigned int *)0x10002f18
#define HostSegTransPoint *(volatile unsigned int *)0x10002f20
#define HostSegStartAddr *(volatile unsigned int *)0x10002f24
#define HostSegEndAddr *(volatile unsigned int *)0x10002f28
#define DiskSegTransPoint *(volatile unsigned int *)0x10002f30
#define DiskSegStartAddr *(volatile unsigned int *)0x10002f34
#define DiskSegEndAddr *(volatile unsigned int *)0x10002f38
#define DMTablePointer *(volatile unsigned int *)0x10002f48
#define SubsegStartAddr_0 *(volatile unsigned int *)0x10002f50
//ZSD Table setting
#define ZSD_1 *(volatile unsigned short *)0x20000
#define ZSD_2 *(volatile unsigned short *)0x20002
#define ZSD_3 *(volatile unsigned short *)0x20004
//ZSD Pointer define
#define ZSD_Table_Point *(volatile unsigned int *)0x10002f0c
#define ZSDTable_pointer 0x20000
/////////////////////////////////////////////////////////////////////
// defination of self servo write
/////////////////////////////////////////////////////////////////////
#define SSW_MAINCTRL *(INT8U *) 0x10002540 //7th bit is SSW_EN, 6th bit is PES only, 5~0 bits are preamble length
#define SSW_EN 0x80
#define SSW_PESONLY 0x40
#define SSW_PREAMBLLEN 0x00
#define SSW_COMBLOCK *(INT8U *) 0x10002546
#define SSW_F0H *(INT8U *) 0x10002548
#define SSW_F0L *(INT8U *) 0x1000254A
#define SSW_DELTAP *(INT8U *) 0x1000254C
#define SSW_TIMESTAMP *(INT8U *) 0x10002590
#define SSW_DISTH *(INT8U *) 0x10002594
#define SSW_DISTL *(INT8U *) 0x10002596
#define SSW_DLYH *(INT8U *) 0x1000259C //only use 13-8 bit of the register
#define SSW_DLYL *(INT8U *) 0x1000259E
#define SSW_WGOUT_EN *(INT8U *) 0x10002476
#define SSW_ENCODE *(INT8U *) 0x10002518 //only 4th bit, =0:manchester;=1:dibit
#define SSW_DISTRESET *(INT8U *) 0x1000253E //distance reset at next SG
/*-----data contral-----------------------*/
#define SSW_PES_CONFIGL4 *(INT8U *) 0x10002542 //high 4 bits are polarity,low 4 bits are pattern
#define SSW_PES_CONFIGH2 *(INT8U *) 0x1000252E //high 2 bits are polarity,next 2 bits are pattern
#define SSW_PES_LEN_MODE_CNT *(INT8U *) 0x100025DC //PES's length,mode and count
#define SSW_PESLEN 0x70 //length is 12 cycles
#define SSW_PESMODE 0x00
#define SSW_PESCNT 0x03
#define SSW_PESGAP *(INT8U *) 0x100025E8 //only high 4 bits used
#define SSW_SSM *(INT8U *) 0x10002544 //sync mark
#define SSW_READBACKEN *(INT8U *) 0x10002518 //gray code read back enable, 7th bit =0:servo gray code read back; =1:servo pattern read back
#define SSW_GRAYCODELEN *(INT8U *) 0x100025AC
#define SSW_GRAYCODESPLIT *(INT8U *) 0x100025AE // only 5~0 bits are used
#define SSW_GRAYCODEDATA *(INT32U *) 0x10002570 //gray code is storied in R2570,R2572,R2574 and R2576
/*------------Servo interrupt contral-----------------*/
#define SSW_INTCTRL *(INT16U *) 0x10008006 // 11~8 bits are xxx1,select servo interrupt(IRQ)
#define SSW_SERVOMASK *(INT16U *) 0x10002690 //
#define SSW_SERVOSTATUS *(INT16U *) 0x1000268c //
/////////////////////////////////////////////////////////////////////
// end of defination of self servo write
/////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -