public static Dictionary <string, AlgCmd> InitCmdMap() { CmdMap.Add("file_name", new AlgCmd("CMD_FILE_NAME", 0x80)); CmdMap.Add("next_line", new AlgCmd("CMD_FILE_NEXTLINE", 0x81)); CmdMap.Add("file_end", new AlgCmd("CMD_FILE_END", 0x82)); CmdMap.Add("comment", new AlgCmd("CMD_COMMENT", 0x84)); CmdMap.Add("print", new AlgCmd("CMD_PRINTSTR", 0x85)); CmdMap.Add("delay_s", new AlgCmd("CMD_DELAY_S", 0x86)); CmdMap.Add("delay_ms", new AlgCmd("CMD_DELAY_MS", 0x87)); CmdMap.Add("delay_us", new AlgCmd("CMD_DELAY_US", 0x88)); CmdMap.Add("show_data", new AlgCmd("CMD_MEMORY_SHOW", 0x89)); CmdMap.Add("ssd_powermode", new AlgCmd("CMD_SSD2832_POWERMODE", 0x90)); CmdMap.Add("ssd_rest", new AlgCmd("CMD_SSD2832_RESET", 0x91)); CmdMap.Add("ssd_pll", new AlgCmd("CMD_SSD2832_PLL", 0x92)); CmdMap.Add("ssd_write", new AlgCmd("CMD_SSD2832_WRITE", 0x93)); CmdMap.Add("ssd_read", new AlgCmd("CMD_SSD2832_READ", 0x94)); CmdMap.Add("mipi_write", new AlgCmd("CMD_MIPI_WRITE", 0xA0)); CmdMap.Add("mipi_read", new AlgCmd("CMD_MIPI_READ", 0xA1)); CmdMap.Add("mipi_video", new AlgCmd("CMD_MIPI_VIDEO", 0xA2)); CmdMap.Add("mipi_timing", new AlgCmd("CMD_MIPI_TIMING", 0xA3)); CmdMap.Add("mipi_mode", new AlgCmd("CMD_MIPI_MODE", 0xA4)); //CmdMap.Add("driver_reset", new AlgCmd("CMD_FPGA_RESET", 0xB0)); CmdMap.Add("driver_write", new AlgCmd("CMD_FPGA_WRITE", 0xB1)); CmdMap.Add("driver_read", new AlgCmd("CMD_FPGA_READ", 0xB2)); CmdMap.Add("driver_dsc", new AlgCmd("CMD_FPGA_DSC", 0xB3)); CmdMap.Add("driver_video", new AlgCmd("CMD_FPGA_VIDEO", 0xB4)); CmdMap.Add("driver_pclk", new AlgCmd("CMD_FPGA_PCLK", 0xB5)); CmdMap.Add("driver_timing", new AlgCmd("CMD_FPGA_TIMING", 0xB6)); CmdMap.Add("show_image", new AlgCmd("CMD_SHOW_IMAGE", 0xB8)); CmdMap.Add("show_color", new AlgCmd("CMD_SHOW_COLOR", 0xB9)); CmdMap.Add("show_special", new AlgCmd("CMD_SHOW_SPECIAL", 0xBa)); CmdMap.Add("show_cycle", new AlgCmd("CMD_SHOW_CYCLE", 0xBb)); CmdMap.Add("set_volt", new AlgCmd("CMD_VOLT_SET", 0xC0)); CmdMap.Add("set_curr", new AlgCmd("CMD_CURR_SET", 0xC1)); CmdMap.Add("get_volt", new AlgCmd("CMD_VOLT_GET", 0xC2)); CmdMap.Add("get_curr", new AlgCmd("CMD_CURR_GET", 0xC3)); CmdMap.Add("gpio_reset", new AlgCmd("CMD_GPIO_RESET", 0xD0)); CmdMap.Add("gpio_on", new AlgCmd("CMD_GPIO_ON", 0xD1)); CmdMap.Add("gpio_off", new AlgCmd("CMD_GPIO_OFF", 0xD2)); CmdMap.Add("pwm", new AlgCmd("CMD_PWM", 0xE0)); CmdMap.Add("iic_write", new AlgCmd("CMD_IIC_WRITE", 0xE5)); CmdMap.Add("iic_read", new AlgCmd("CMD_IIC_READ", 0xE6)); return(CmdMap); }
/// <summary> /// AddItemToCommandMap /// </summary> /// <param name="key">int</param> /// <param name="command">CmdHandler</param> public static void AddItemToCommandMap(int key, CmdHandler command) { if (null == CmdMap) { GlobalDefinition.LoggerWrapper.LogTraceInfo("CmdMap is null"); return; } if (!CmdMap.ContainsKey(key)) { CmdMap.Add(key, command); } }