📄 wndw_rc_fmt.c
字号:
#endif
}
}
//==================================================================================
void SetWndwRcFmTypeMux(void)
{
U8 _t1_, _t2_=0;//, _t3_;
for(_t1_=0;_t1_<cmn_max_ch;_t1_++){
SetCrntDvcCh(_t1_,&wndw_crnt_dvc,&wndw_crnt_ch);
if(wndw_crnt_dvc != _t2_){
_t2_ = wndw_crnt_dvc;
// SetFrameOp(PTH_Y,wndw_crnt_dvc,OFF);
SetAsicFlgType(wndw_crnt_dvc,DVC_PG1,0x51,BIT6,0x00); //... FRAME_OP=0
// _t3_ = ReadAsicByte(wndw_crnt_dvc,DVC_PG1,0x56);
if(wndw_ds_sc_fmt == SC_FMT_8CH){
// ClearBit(_t3_,BIT6);
SetAsicFlgType(wndw_crnt_dvc,DVC_PG1,0x56,BIT6,0x00); //... TRIG_MODE=0
}
else{
// if(wndw_rc_fm_mux_type == MUX_TYPE_LV){
if(wndw_rc_fm_type == MUX_TYPE_LV){
// SetBit(_t3_,BIT7);
// SetBit(_t3_,0x30);
SetAsicFlgType(wndw_crnt_dvc,DVC_PG1,0x56,BIT7|BIT6|0x30,BIT7|BIT6|0x30); //... MUX_LIVE=1, TRIG_MODE=1, MUX_FLD=3
}
else if(wndw_rc_fm_type == MUX_TYPE_FR){
// ClearBit(_t3_,BIT7);
// SetBit(_t3_,0x30);
SetAsicFlgType(wndw_crnt_dvc,DVC_PG1,0x56,BIT7|BIT6|0x30,BIT6|0x30); //... MUX_LIVE=0, TRIG_MODE=1, MUX_FLD=3
}
else{
// ClearBit(_t3_,BIT7|0x30);
SetAsicFlgType(wndw_crnt_dvc,DVC_PG1,0x56,BIT7|BIT6|0x30,BIT6); //... MUX_LIVE=0, TRIG_MODE=1, MUX_FLD=0
}
}
// WriteAsicByte(wndw_crnt_dvc,DVC_PG1,0x56,_t3_);
#if defined(__16CH__)
SetAsicFlgType(wndw_crnt_dvc,DVC_PG1,0x70,0xc0,0x00); //... POS_CTL_EN=0,POPUP_TRIG_MODE=0
#endif
}
SetChFl(PTH_Y,wndw_crnt_dvc,wndw_crnt_ch);
// SetChFuncMode(PTH_Y,wndw_crnt_dvc,wndw_crnt_ch,POP_UP,ON);
// SetChFuncMode(PTH_Y,wndw_crnt_dvc,wndw_crnt_ch,NULL,CH_FUNC_MUX);
SetAsicFlgType(wndw_crnt_dvc,DVC_PG1,0x60+wndw_crnt_ch*3,0x70,0x60); //... POP_UP_EN=1,FUNC_MODE=2
}
}
//==================================================================================
void SetWndwRcFmType(void)
{
U8 _t1_;//, _t2_=0;
// U16 _dly_;
for(_t1_=0;_t1_<cmn_max_ch;_t1_++){
SetCrntDvcCh(_t1_,&wndw_crnt_dvc,&wndw_crnt_ch);
// SetChFuncMode(PTH_Y,wndw_crnt_dvc,wndw_crnt_ch,NULL,CH_FUNC_STRB);
SetAsicFlgType(wndw_crnt_dvc,DVC_PG1,0x60+wndw_crnt_ch*3,0x30,0x10); //... FUNC_MODE=1
}
//// for(_t1_=0;_t1_<cmn_max_ch;_t1_++){
//// SetCrntDvcCh(_t1_,&wndw_crnt_dvc,&wndw_crnt_ch);
//// if(wndw_crnt_dvc != _t2_){
//// _t2_ = wndw_crnt_dvc;
//// }
//// }
//
// for(_dly_=0;_dly_<30000;_dly_++){ //... check finishing strobe for max 30000 times
// _t1_=0;
// _t1_ |= GetAsicFlgType(MASTER,DVC_PG1,0x54,0x0f);
//#if defined(__16CH__)
// _t1_ |= GetAsicFlgType(SLAVE1,DVC_PG1,0x54,0x0f);
// _t1_ |= GetAsicFlgType(SLAVE2,DVC_PG1,0x54,0x0f);
// _t1_ |= GetAsicFlgType(SLAVE3,DVC_PG1,0x54,0x0f);
//#endif
// if(_t1_==0) break;
// }
WaitChStrbDoneY(0x0f); //... check for four channels of each devices
// if(b_rc_fm_type == FM_TYPE_CIF) SetWndwRcFmTypeCif();
if((wndw_rc_fm_type == CIF_TYPE_FR)||(wndw_rc_fm_type == CIF_TYPE_FL))
SetWndwRcFmTypeCif();
else SetWndwRcFmTypeMux();
}
//==================================================================================
//==================================================================================
void CreateWndwRcFm(U8 _pth)
{
// b_status_wndw = ON;
b_cmn_wndw_mn = ON;
WriteOSDClr(_pth,MASTER,WNDW_RC_FM_POS_X,WNDW_RC_FM_POS_Y,WNDW_RC_FM_L,WNDW_RC_FM_H);
SetOSDWndw(_pth,OSD_WNDW_TYPE_MAIN,WNDW_RC_FM_POS_X,WNDW_RC_FM_POS_Y,WNDW_RC_FM_L,WNDW_RC_FM_H,str_wndw_ttl_rc_fm);
// SetWndwRcFmOSDType(_pth);
SetWndwRcFmOSDCif(_pth);
SetWndwRcFmOSDMux(_pth);
SetWndwRcFmOSDPrd(_pth);
SetWndwRcFmOSDBtn(_pth);
}
//==================================================================================
void RunWndwRcFmType(U8 _pth)//U8 _osd_pos_x_, U8 _osd_pos_y_)
{
U16 _rdat_;
U8 _dvc_, _ch_;
U8 _t1_;
U8 _osd_pos_x_, _osd_pos_y_;
_osd_pos_x_ = GetMseOSDX(reg_crsr_pos_x);
_osd_pos_y_ = GetMseOSDY(reg_crsr_pos_y);
#if defined(__4CH__)
// if(b_rc_fm_type == FM_TYPE_MUX)
if((wndw_rc_fm_type > CIF_TYPE_FL)&&(wndw_ds_sc_fmt != SC_FMT_8CH))
#endif
RunWndwRcFmOSDArw(_pth,_osd_pos_x_,_osd_pos_y_);
if(b_mse_btn_dwn_lb == 1){
b_mse_btn_dwn_lb = 0;
if((_osd_pos_x_ == WNDW_RC_FM_CLOS_X)&&(_osd_pos_y_ == WNDW_RC_FM_CLOS_Y)){
// SetBoxBtnStrPush(BOX_WNDW_QUIT);
}
#if defined(__4CH__)
// else if((b_rc_fm_type == FM_TYPE_MUX)&&(wndw_ds_sc_fmt != SC_FMT_8CH)&&
else if((wndw_rc_fm_type > CIF_TYPE_FL)&&(wndw_ds_sc_fmt != SC_FMT_8CH)&&
((_osd_pos_x_ >= WNDW_RC_FM_BTN_X)&&(_osd_pos_x_ < (WNDW_RC_FM_BTN_X+9))))
#elif defined(__16CH__)
else if((_osd_pos_x_ >= WNDW_RC_FM_BTN_X)&&(_osd_pos_x_ < (WNDW_RC_FM_BTN_X+9)))
#endif
{
//#if defined(__4CH__)
if(_osd_pos_y_ == WNDW_RC_FM_BTN_LOSS_Y){
// SetBoxBtnStrPush(FM_BOX_LOSS);
}
else if(_osd_pos_y_ == WNDW_RC_FM_BTN_QUE_Y){
// SetBoxBtnStrPush(FM_BOX_QUE);
}
//#endif
}
}
if(b_mse_btn_dwn_rb == 1) b_mse_btn_dwn_rb = 0;
if(b_mse_clk_lb == 1){
b_mse_clk_lb = 0;
if((_osd_pos_x_ == WNDW_RC_FM_CLOS_X)&&(_osd_pos_y_ == WNDW_RC_FM_CLOS_Y)){
// SetBoxBtnStrPull(BOX_WNDW_QUIT);
WriteOSDClr(_pth,MASTER,WNDW_RC_FM_POS_X,WNDW_RC_FM_POS_Y,WNDW_RC_FM_L,WNDW_RC_FM_H);
WriteOSDClrX(MASTER,WNDW_RC_FM_POS_X-1,WNDW_RC_FM_POS_Y-1,WNDW_RC_FM_L+2,WNDW_RC_FM_H+2);
// WriteOSDClr(_pth,MASTER,16,4,15,15);
// DisableBox(PTH_Y,FM_BOX_LOSS,BOX_WNDW_FRM); // decoration wndwdow, main wndwdow
SetOSDNoMn();
// b_status_wndw = OFF;
// global_menu_crnt_pos = 30;
b_cmn_wndw_mn = OFF;
wndw_mn_pos_crnt = 30;
}
// else if((_osd_pos_x_ == WNDW_RC_FM_RDO_X)&&((_osd_pos_y_ >= WNDW_RC_FM_RDO_CIF_FR_Y)&&(_osd_pos_y_ <= WNDW_RC_FM_RDO_MUX_LV_Y))){
// _t1_ = _osd_pos_y_ - WNDW_RC_FM_RDO_CIF_FR_Y;
// if(_t1_ != wndw_rc_fm_type){
// wndw_rc_fm_type = _t1_;
//
// SetWndwRcFmType();
//
// SetWndwRcFmOSDCifRdo(_pth);
// SetWndwRcFmOSDMuxRdo(_pth);
//
// if(wndw_ds_sc_fmt != SC_FMT_8CH){
//// SetWndwRcFmOSDCif(_pth);
//// SetWndwRcFmOSDMux(_pth);
//
// SetWndwRcFmOSDPrd(_pth);
// SetWndwRcFmOSDBtn(_pth);
//
// if(wndw_ds_sc_fmt == SC_FMT_1CH){
// SetWndwDsScFmtFl();
// }
// else if(wndw_ds_sc_fmt == SC_FMT_4CH){
// SetWndwDsScFmtLv();
// }
//#if defined(__16CH__)
// else if(wndw_ds_sc_fmt == SC_FMT_16CH){
// SetWndwDsScFmtLv();
// }
//#endif
// }
//#if defined(__4CH__)
// else{
//
// SetWndwDsScFmtPsd8Ch();
// }
//#endif
// }
// }
#if defined(__4CH__)
else if(wndw_ds_sc_fmt == SC_FMT_8CH){
if((_osd_pos_x_ == WNDW_RC_FM_RDO_X)&&((_osd_pos_y_<=WNDW_RC_FM_RDO_CIF_FL_Y)||(_osd_pos_y_==WNDW_RC_FM_RDO_MUX_FL_Y))){
_t1_ = _osd_pos_y_ - WNDW_RC_FM_RDO_CIF_FR_Y;
if(_t1_ != wndw_rc_fm_type){
wndw_rc_fm_type = _t1_;
SetWndwRcFmType();
SetWndwRcFmOSDCifRdo(_pth);
SetWndwRcFmOSDMuxRdo(_pth);
SetWndwDsScFmtPsd8Ch();
}
}
}
#endif
else if((_osd_pos_x_ == WNDW_RC_FM_RDO_X)&&((_osd_pos_y_ >= WNDW_RC_FM_RDO_CIF_FR_Y)&&(_osd_pos_y_ <= WNDW_RC_FM_RDO_MUX_LV_Y))){
_t1_ = _osd_pos_y_ - WNDW_RC_FM_RDO_CIF_FR_Y;
if(_t1_ != wndw_rc_fm_type){
wndw_rc_fm_type = _t1_;
SetWndwRcFmType();
SetWndwRcFmOSDCifRdo(_pth);
SetWndwRcFmOSDMuxRdo(_pth);
// if(wndw_ds_sc_fmt != SC_FMT_8CH){
//// SetWndwRcFmOSDCif(_pth);
//// SetWndwRcFmOSDMux(_pth);
SetWndwRcFmOSDPrd(_pth);
SetWndwRcFmOSDBtn(_pth);
// if(wndw_ds_sc_fmt == SC_FMT_1CH){
// SetWndwDsScFmtFl();
// }
// else if(wndw_ds_sc_fmt == SC_FMT_4CH){
// SetWndwDsScFmtLv();
// }
//#if defined(__16CH__)
// else if(wndw_ds_sc_fmt == SC_FMT_16CH){
// SetWndwDsScFmtLv();
// }
//#endif
//// }
////#if defined(__4CH__)
//// else{
////
//// SetWndwDsScFmtPsd8Ch();
//// }
////#endif
#if defined(__4CH__)
if(wndw_ds_sc_fmt == SC_FMT_4CH)
#elif defined(__16CH__)
if(wndw_ds_sc_fmt == SC_FMT_16CH)
#endif
SetWndwDsScFmtLvPb();
for(_t1_=0;_t1_<cmn_max_ch;_t1_++){
SetCrntDvcCh(_t1_,&_dvc_,&_ch_);
InitChScaleAdapt(_dvc_,_ch_);
}
}
}
else if((_osd_pos_y_ == WNDW_RC_FM_PRD_Y)||(_osd_pos_y_ == WNDW_RC_FM_BTN_QUE_Y)||(_osd_pos_y_ == WNDW_RC_FM_BTN_LOSS_Y)){
#if defined(__4CH__)
// if((b_rc_fm_type == FM_TYPE_MUX)&&(wndw_ds_sc_fmt != SC_FMT_8CH)){
if((wndw_rc_fm_type > CIF_TYPE_FL)&&(wndw_ds_sc_fmt != SC_FMT_8CH)){
#endif
if(_osd_pos_y_ == WNDW_RC_FM_PRD_Y){
if((_osd_pos_x_ == WNDW_RC_FM_DEC_X)||(_osd_pos_x_ == WNDW_RC_FM_INC_X)){
_rdat_ = GetWndwRcFmPrd();
if(_osd_pos_x_ == WNDW_RC_FM_DEC_X){
if(_rdat_ > 0) _rdat_--;
else _rdat_ = 0x03ff;
}
else{// if(_osd_pos_x_ == WNDW_RC_FM_INC_X){
if(_rdat_ < 0x03ff) _rdat_++;
else _rdat_ = 0;
}
SetWndwRcFmOSDNum(_pth,_rdat_);
SetWndwRcFmPrd(_rdat_);
}
}
//#if defined(__4CH__)
else if((_osd_pos_x_ >= WNDW_RC_FM_BTN_X)&&(_osd_pos_x_ < (WNDW_RC_FM_BTN_X+9))){
if(_osd_pos_y_ == WNDW_RC_FM_BTN_LOSS_Y){
// SetBoxBtnStrPull(FM_BOX_LOSS);
CreateWndwRcFmLs();
}
else if(_osd_pos_y_ == WNDW_RC_FM_BTN_QUE_Y){
// SetBoxBtnStrPull(FM_BOX_QUE);
CreateWndwRcFmQu();
}
}
//#endif
#if defined(__4CH__)
}
#endif
}
}
if(b_mse_clk_rb == 1) b_mse_clk_rb = 0;
if(b_mse_pshng_clk_lb == 1){
b_mse_pshng_clk_lb = 0;
#if defined(__4CH__)
// if((b_rc_fm_type == FM_TYPE_MUX)&&(_osd_pos_y_ == WNDW_RC_FM_PRD_Y))
if((wndw_rc_fm_type > CIF_TYPE_FL)&&(_osd_pos_y_ == WNDW_RC_FM_PRD_Y))
#elif defined(__16CH__)
if(_osd_pos_y_ == WNDW_RC_FM_PRD_Y)
#endif
{
if((_osd_pos_x_ == WNDW_RC_FM_DEC_X)||(_osd_pos_x_ == WNDW_RC_FM_INC_X)){
_rdat_ = GetWndwRcFmPrd();
if(_osd_pos_x_ == WNDW_RC_FM_DEC_X){
if(_rdat_ > 0) _rdat_--;
// else _rdat_ = 0x01fe;
else _rdat_ = 0x03ff;
}
else{// if(_osd_pos_x_ == WNDW_RC_FM_INC_X){
if(_rdat_ < 0x03ff) _rdat_++;
// if(_rdat_ < 0x01fe) _rdat_++;
else _rdat_ = 0;
}
SetWndwRcFmOSDNum(_pth,_rdat_);
SetWndwRcFmPrd(_rdat_);
}
}
}
if(b_mse_pshng_clk_rb == 1) b_mse_pshng_clk_rb = 0;
}
//==================================================================================
void RunWndwRcFm(U8 _pth)//U8 _osd_pos_x_, U8 _osd_pos_y_)
{
if(b_rc_fm_que == ON){
RunWndwRcFmQu();//_osd_pos_x_,_osd_pos_y_);
}
else if(b_rc_fm_loss == ON){
RunWndwRcFmLs();//_osd_pos_x_,_osd_pos_y_);
}
else
RunWndwRcFmType(_pth);//_osd_pos_x_,_osd_pos_y_);
}
//==================================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -