public void video_auto(MIPI mipi, double target_symbol_rate) { from_delegate controlform = new from_delegate(); int[] porch = mipi.get_porch_setting(); while (mipi.cnt_symbolrate() < target_symbol_rate) { mipi.set_porch(porch[0] + 8, porch[1] + 8, porch[2] + 8, porch[3], porch[4], porch[5], porch[6], porch[7]); Thread.Sleep(500); } }
public void send_videomode_pic(MIPI dut) { if (dut.get_pixel_format() == 16) { } else if (dut.get_pixel_format() == 18) { } else { //RPCCmd(RPCCmds, 1, RPCDefs.PIXEL_STREAM_RGB888, m_appDir + "rgbstripes640x480.bmp"); } }
public int set_prameter(MIPI mipi) { int rc = client.Connect("", SERVER_PORT); if (rc < 0) { return(0); } int[] porch = mipi.get_porch_setting(); double fr = mipi.get_framerate(); double[] phy_volt = mipi.get_phy_volt(); bool[] video_type = mipi.get_video_type(); bool[] blanking_type = mipi.get_blanking_type(); //**HS,LP電壓,symbol rate , lp freq , lane數 RPCCmd(RPCCmds.START_EDIT_CONFIG); RPCCmd(RPCCmds.SET_DT_MODE, RPCDefs.DT_HS); RPCCmd(RPCCmds.SET_LP_FREQ, mipi.get_lp_freq()); RPCCmd(RPCCmds.SET_HS_SYM_RATE, mipi.get_symbolrate()); RPCCmd(RPCCmds.SET_LANE_CNT, mipi.get_lane()); RPCCmd(RPCCmds.SET_HS_HIGH_VOLT, 1, phy_volt[0]); RPCCmd(RPCCmds.SET_HS_LOW_VOLT, 1, phy_volt[1]); RPCCmd(RPCCmds.SET_LP_HIGH_VOLT, phy_volt[2]); RPCCmd(RPCCmds.SET_LP_LOW_VOLT, phy_volt[3]); RPCCmd(RPCCmds.END_EDIT_CONFIG); ///porch,resolution寫進PG RPCCmd(RPCCmds.SET_TIMING_HBPORCH, porch[0]); RPCCmd(RPCCmds.SET_TIMING_HFPORCH, porch[1]); RPCCmd(RPCCmds.SET_TIMING_HSYNC, porch[2]); RPCCmd(RPCCmds.SET_TIMING_HACTIVE, porch[3]); RPCCmd(RPCCmds.SET_TIMING_VBPORCH, porch[4]); RPCCmd(RPCCmds.SET_TIMING_VFPORCH, porch[5]); RPCCmd(RPCCmds.SET_TIMING_VSYNC, porch[6]); RPCCmd(RPCCmds.SET_TIMING_VACTIVE, porch[7]); RPCCmd(RPCCmds.SET_TIMING_FRAME_RATE, mipi.get_framerate()); ////Video type,blanking type寫入 RPCCmd(RPCCmds.SET_TIMING_ENABLE_DSI_BURST_MODE, video_type[0]); RPCCmd(RPCCmds.SET_TIMING_ENABLE_DSI_PULSE_MODE, video_type[1]); RPCCmd(RPCCmds.SET_TIMING_HSYNC_BLANKING_MODE, blanking_type[0] ? 1 : 2); RPCCmd(RPCCmds.SET_TIMING_HBPORCH_BLANKING_MODE, blanking_type[1] ? 1 : 2); RPCCmd(RPCCmds.SET_TIMING_HFPORCH_BLANKING_MODE, blanking_type[2] ? 1 : 2); RPCCmd(RPCCmds.SET_TIMING_VERTICAL_BLANKING_MODE, blanking_type[3] ? 1 : 2); return(0); }
public void set_blanking(MIPI mipi) { bool[] blanking_type = mipi.get_blanking_type(); if (blanking_type[0]) { RPCCmd(RPCCmds.SET_TIMING_HSYNC_BLANKING_MODE, RPCDefs.LP11_BLANK_MODE); } else { RPCCmd(RPCCmds.SET_TIMING_HSYNC_BLANKING_MODE, RPCDefs.HS_BLANK_MODE); } if (blanking_type[1]) { RPCCmd(RPCCmds.SET_TIMING_HBPORCH_BLANKING_MODE, RPCDefs.LP11_BLANK_MODE); } else { RPCCmd(RPCCmds.SET_TIMING_HBPORCH_BLANKING_MODE, RPCDefs.HS_BLANK_MODE); } if (blanking_type[2]) { RPCCmd(RPCCmds.SET_TIMING_HFPORCH_BLANKING_MODE, RPCDefs.LP11_BLANK_MODE); } else { RPCCmd(RPCCmds.SET_TIMING_HFPORCH_BLANKING_MODE, RPCDefs.HS_BLANK_MODE); } if (blanking_type[3]) { RPCCmd(RPCCmds.SET_TIMING_VERTICAL_BLANKING_MODE, RPCDefs.LP11_BLANK_MODE); } else { RPCCmd(RPCCmds.SET_TIMING_VERTICAL_BLANKING_MODE, RPCDefs.HS_BLANK_MODE); } }