📄 servok.h
字号:
/* Copyright 2001, ESS Technology, Inc. *//* SCCSID @(#)servok.h 4.3 04/29/04 *//* * based on version 1.5 servom.h */#ifndef __SAM_SRV_H__#define __SAM_SRV_H__/************************************************************************ * Defines for SAM_SRV. * ************************************************************************//* Access Command Setting */#define KICK 0xF0 /*************/#define TCNT 0xF0 /************//* STAT Signal */#define CLVS 0xF0#define TTSTOP 0xF0#define SYFLG 0xF0/* SENSE Signal */#define Dsense 0xF0 /* SENSE Output */#define Dflock 0xF0 /* FLOCK Output */#define Dtlock 0xF0 /* TLOCK Output *//* Automatic Adjustment */#define ABC1 0xF0 /* Fo balance adjustment */#define ADA 0xF0 /* Stopping automatic adjustment */#define AOC 0xF0 /* Offset adjustment */#define ABC2 0xF0 /* 1 Tr balance adjustment */#define AGC1 0xF0 /* Fo rough gain adjustment */#define AGC2 0xF0 /* 2 Tr rough gain adjustment */#define FAGC 0xF0 /* Fo fine gain adjustment */#define TAGC 0xF0 /* 3 Tr fine gain adjustment *//* Optical Servo */#define STB 0xF0 /* Standby */#define DDT 0xF0 /* Disc detection */#define TOF 0xF0 /* Fo ON, Tr OFF */#define PLY 0xF0 /* Fo ON, Tr ON *//* TRV LIMIT Servo */#define TVS 0xF0 /* TRV stop */#define TVF 0xF0 /* TRV forward feed */#define TVR 0xF0 /* TRV reverse feed */#define TVP 0xF0 /* TRV play *//* Access */#define ACA 0xF0 /* Stopping access operation */#define KICK 0xF0 /* Kick */#define TCNT 0xF0 /* TCNT *//* Spindle */#define SSTOP 0xF0 /* Stop */#define SFREE 0xF0 /* Free Running */#define SACC 0xF0 /* Acceleration */#define SBRAKE1 0xF0 /* Deceleration with turntable off */#define SBRAKE2 0xF0 /* Deceleration with turntable on */#define SPLAY 0xF0 /* Normal Play *//* Audio Mode */#define AUDIO1 0xF0#define AUDIO2 0xF0#define STOP_10 5#define STOP_20 6#define STOP_25 7#define STOP_30 8#define STOP_40 9#define STOP_50 10#define STOP_61 11#define STOP_60 12#define STOP_70 13#define STOP_80 14#define FOCUS_00 15#define FOCUS_10 16#define FOCUS_20 17#define FOCUS_30 18#define FOCUS_40 19#define FOCUS_50 20#define CLV_10 20#define CLV_20 21#define CLV_30 22#define CLV_40 23#define CLV_45 24#define CLV_50 29#define CLV_55 30#define CLV_60 31#define CLV_65 32#define CLV_70 33#define CLV_75 34#define CLV_80 35#define CLV_85 36#define CLV_90 37#define CLV_100 38#define CLV_110 39#define JUMP_10 40#define JUMP_20 41#define JUMP_30 42#define JUMP_40 43#define EFV_10 122#define FBIAS_10 123#define FBIAS_20 124#define AGC_10 125#define AGC_20 126#define TOC_10 127#define ACES_10 128#define ACES_20 129#define ACES_30 130#define ACES_40 131#define CUE_10 132#define CUE_20 133#define CUE_30 134#define CUE_40 135#define PLAY_10 136#define RUN_10 137#define EMR_10 138#define EMR_20 139#define FB_SPL 160/**************************************** * Global variables * ****************************************/GBLDEF(unsigned char servo_auto_adj, 0);/*bit 0 : Faoc1bit 1 : Fagc1bit 2 : Fagc2bit 3 : Fabc2bit 4 : Fabc1bit 5 : Ffagcbit 6 : Ftagc*/#define SET_Faoc servo_auto_adj |= 0x01#define Faoc_TRUE (servo_auto_adj & 0x01)#define SET_Fagc1 servo_auto_adj |= 0x02#define Fagc1_TRUE (servo_auto_adj & 0x02)#define SET_Fagc2 servo_auto_adj |= 0x04#define Fagc2_TRUE (servo_auto_adj & 0x04)#define Fagc2_FALSE !(servo_auto_adj & 0x04)#define SET_Fabc2 servo_auto_adj |= 0x08#define Fabc2_TRUE (servo_auto_adj & 0x08)#define SET_Fabc1 servo_auto_adj |= 0x10#define Fabc1_TRUE (servo_auto_adj & 0x10)#define SET_Ffagc servo_auto_adj |= 0x20#define Ffagc_TRUE (servo_auto_adj & 0x20)#define SET_Ftagc servo_auto_adj |= 0x40#define Ftagc_TRUE (servo_auto_adj & 0x40)GBLDEF(unsigned char servo_flag, 0);/*bit 0 : Fcdrom 0 - CD ; 1- VCDbit 1 : Fanalog 0 - Analog PLL; 1 - Digital PLLbit 2 : F1dbiasbit 3 : Fjumpbit 4 : Fshockbit 5 : Fflockbit 6 : Ftlock*/#define SET_Fcdrom servo_flag |= 0x01#define CLR_Fcdrom servo_flag &= ~0x01#define Fcdrom_TRUE (servo_flag & 0x01)#define Fcdrom_FALSE !(servo_flag & 0x01)#define SET_Fanalog servo_flag |= 0x02#define CLR_Fanalog servo_flag &= ~0x02#define Fanalog_TRUE (servo_flag & 0x02)#define Fanalog_FALSE !(servo_flag & 0x02)#define SET_F1dbias servo_flag |= 0x04#define CLR_F1dbias servo_flag &= ~0x04#define F1dbias_TRUE (servo_flag & 0x04)#define F1dbias_FALSE !(servo_flag & 0x04)#if 0#define SET_Fjump servo_flag |= 0x08#define CLR_Fjump servo_flag &= ~0x08#define Fjump_TRUE (servo_flag & 0x08)#define Fjump_FALSE !(servo_flag & 0x08)#endif#define SET_Fshock servo_flag |= 0x10#define CLR_Fshock servo_flag &= ~0x10#define Fshock_TRUE (servo_flag & 0x10)#define Fshock_FALSE !(servo_flag & 0x10)#define SET_Fflock servo_flag |= 0x20#define CLR_Fflock servo_flag &= ~0x20#define Fflock_TRUE (servo_flag & 0x20)#define Fflock_FALSE !(servo_flag & 0x20)#define SET_Ftlock servo_flag |= 0x40#define CLR_Ftlock servo_flag &= ~0x40#define Ftlock_TRUE (servo_flag & 0x40)#define Ftlock_FALSE !(servo_flag & 0x40)#define SET_Ffocus servo_flag |= 0x80#define CLR_Ffocus servo_flag &= ~0x80#define Ffocus_TRUE (servo_flag & 0x80)#define Ffocus_FALSE !(servo_flag & 0x80)/*some flag for 9223 adjustment */GBLDEF0(unsigned int samsvr_flag);#define SET_focus_adj samsvr_flag|=0x0001#define CLR_focus_adj samsvr_flag&=~0x0001#define focus_adj (samsvr_flag&0x0001)#define SET_foc_ctl_f samsvr_flag|=0x0001#define CLR_foc_ctl_f samsvr_flag|=0x0001#define foc_ctl_f_TRUE (samsvr_flag&0x0001)#define foc_ctl_f_FALSE !(samsvr_flag&0x0001)#define SET_track_adj samsvr_flag|=0x0002#define CLR_track_adj samsvr_flag&=~0x0002#define track_adj (samsvr_flag&0x0002)#define SET_clv_cntl_f samsvr_flag|=0x0002#define CLR_clv_cntl_f samsvr_flag&=~0x0002#define clv_cntl_f_TRUE (samsvr_flag&0x0002)#define clv_cntl_f_FALSE !(samsvr_flag&0x0002)#define SET_subqchk_fg samsvr_flag|=0x0004#define CLR_subqchk_fg samsvr_flag&=~0x0004#define subqchk_fg (samsvr_flag&0x0004)#define SET_gfschk_fg samsvr_flag|=0x0008#define CLR_gfschk_fg samsvr_flag&=~0x0008#define gfschk_fg (samsvr_flag&0x0008)#define SET_seek_fg samsvr_flag|=0x0010#define CLR_seek_fg samsvr_flag&=~0x0010#define seek_fg (samsvr_flag&0x0010)#define SET_recover_fg samsvr_flag|=0x0020#define CLR_recover_fg samsvr_flag&=~0x0020#define recover_fg (samsvr_flag&0x0020)#define SET_search_fg samsvr_flag|=0x0040#define CLR_search_fg samsvr_flag&=~0x0040#define search_fg (samsvr_flag&0x0040)#define SET_match_75frm samsvr_flag|=0x0080#define CLR_match_75frm samsvr_flag&=~0x0080#define match_75frm (samsvr_flag&0x0080)#define SET_rcv_fg samsvr_flag|=0x0100#define CLR_rcv_fg samsvr_flag&=~0x0100#define rcv_fg (samsvr_flag&0x0100)#define SET_track_fail samsvr_flag |= 0x0200#define CLR_track_fail samsvr_flag &= ~0x0200#define track_fail_TRUE (samsvr_flag & 0x0200)#define track_fail_FALSE !(samsvr_flag & 0x0200)#define SET_gain_fail samsvr_flag |= 0x0400#define CLR_gain_fail samsvr_flag &= ~0x0400#define gain_fail_TRUE (samsvr_flag & 0x0400)#define gain_fail_FALSE !(samsvr_flag & 0x0400)#if 0#define SET_servo_focus_on samsvr_flag |= 0x0800#define CLR_servo_focus_on samsvr_flag &= ~0x0800#define servo_focus_on_TRUE (samsvr_flag & 0x0800)#define servo_focus_on_FALSE !(samsvr_flag & 0x0800)#define SET_kickfg samsvr_flag |= 0x1000#define CLR_kickfg samsvr_flag &= ~0x1000#define kickfg_TRUE (samsvr_flag & 0x1000)#define kickfg_FALSE !(samsvr_flag & 0x1000)#define SET_SERVO_new_Qcode samsvr_flag |= 0x2000#define CLR_SERVO_new_Qcode samsvr_flag &= ~0x2000#define SERVO_new_Qcode_TRUE (samsvr_flag & 0x2000)#define SERVO_new_Qcode_FALSE !(samsvr_flag & 0x2000)#endif 0#define SET_autoseq samsvr_flag |= 0x4000#define CLR_autoseq samsvr_flag &= ~0x4000#define autoseq_TRUE (samsvr_flag & 0x4000)#define autoseq_FALSE !(samsvr_flag & 0x4000)#define SET_s18dly samsvr_flag |= 0x8000#define CLR_s18dly samsvr_flag &= ~0x8000#define s18dly_TRUE (samsvr_flag & 0x8000)#define s18dly_FALSE !(samsvr_flag & 0x8000)GBLDEF0(unsigned char samsvr_flaga);#define SET_tasking_fg samsvr_flaga |= 0x01#define CLR_tasking_fg samsvr_flaga &= ~0x01#define tasking_fg_TRUE (samsvr_flaga & 0x01)#define tasking_fg_FALSE !(samsvr_flaga & 0x01)#define SET_fok_chk samsvr_flaga |= 0x02#define CLR_fok_chk samsvr_flaga &= ~0x02#define fok_chk_TRUE (samsvr_flaga & 0x02)#define fok_chk_FALSE !(samsvr_flaga & 0x02)#define SET_sledin_fg samsvr_flaga |= 0x04#define CLR_sledin_fg samsvr_flaga &= ~0x04#define sledin_fg_TRUE (samsvr_flaga & 0x04)#define sledin_fg_FALSE !(samsvr_flaga & 0x04)#if 0#define SET_mp3_service samsvr_flaga |= 0x08#define CLR_mp3_service samsvr_flaga &= ~0x08#define mp3_service_TRUE (samsvr_flaga & 0x08)#define mp3_service_FALSE !(samsvr_flaga & 0x08)#define SET_mp3_seek samsvr_flaga |= 0x10#define CLR_mp3_seek samsvr_flaga &= ~0x10#define mp3_seek_TRUE (samsvr_flaga & 0x10)#define mp3_seek_FALSE !(samsvr_flaga & 0x10)#endif 0#define SET_Fjump samsvr_flaga |= 0x20#define CLR_Fjump samsvr_flaga &= ~0x20#define Fjump_TRUE (samsvr_flaga & 0x20)#define Fjump_FALSE !(samsvr_flaga & 0x20)#define SET_Fsearch samsvr_flaga |= 0x40#define CLR_Fsearch samsvr_flaga &= ~0x40#define Fsearch_TRUE (samsvr_flaga & 0x40)#define Fsearch_FALSE !(samsvr_flaga & 0x40)#define SET_rf_h_f samsvr_flaga |= 0x80#define CLR_rf_h_f samsvr_flaga &= ~0x80#define rf_h_f_TRUE (samsvr_flaga & 0x80)#define rf_h_f_FALSE !(samsvr_flaga & 0x80)GBLDEF0(unsigned char samsvr_flagb);#define SET_rf_l_f samsvr_flagb |= 0x01#define CLR_rf_l_f samsvr_flagb &= ~0x01#define rf_l_f_TRUE (samsvr_flagb & 0x01)#define rf_l_f_FALSE !(samsvr_flagb & 0x01)#define SET_fok_f samsvr_flagb |= 0x02#define CLR_fok_f samsvr_flagb &= ~0x02#define fok_f_TRUE (samsvr_flagb & 0x02)#define fok_f_FALSE !(samsvr_flagb & 0x02)#define SET_bs_low_f samsvr_flagb |= 0x04#define CLR_bs_low_f samsvr_flagb &= ~0x04#define bs_low_f_TRUE (samsvr_flagb & 0x04)#define bs_low_f_FALSE !(samsvr_flagb & 0x04)#define SET_rw_f samsvr_flagb |= 0x08#define CLR_rw_f samsvr_flagb &= ~0x08#define rw_f_TRUE (samsvr_flagb & 0x08)#define rw_f_FALSE !(samsvr_flagb & 0x08)/* * Public variables */EXPORT char SERVO_mode;GBLDEF(unsigned char mp3_playing, 0);GBLDEF(char mp3_service, 0);GBLDEF(char mp3_seek, 0);GBLDEF(short is_ngame, 0);#endif /* __SAM_SRV_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -