public void GetCapabilities() { if (SelectedProgrammer == "") { return; } ProgrammerSupportedAquireMode.Clear(); ProgrammerSupportedVoltage.Clear(); ProgrammerSupportedConnectors.Clear(); ProgrammerSupportedClocks.Clear(); string strError; //object programmerCapabilities; byte[] programmerCapabilities; int hr = Programmer.GetProgrammerCapsByName(SelectedProgrammer, out programmerCapabilities, out strError); if (IsSuccess(hr)) { //byte[] caps = programmerCapabilities as byte[]; byte[] caps = programmerCapabilities; //Acquire Mode: if ((caps[0] & (byte)enumValidAcquireModes.CAN_RESET_ACQUIRE) != 0) { ProgrammerSupportedAquireMode.Add("Reset"); } if ((caps[0] & (byte)enumValidAcquireModes.CAN_POWER_CYCLE_ACQUIRE) != 0) { ProgrammerSupportedAquireMode.Add("Power Cycle"); } if ((caps[0] & (byte)enumValidAcquireModes.CAN_POWER_DETECT_ACQUIRE) != 0) { ProgrammerSupportedAquireMode.Add("Power Detect"); } if (SelectedProgrammer.StartsWith("MiniProg3") && (PSoCProgrammerInstalled == true)) { //Voltages can be supplied by programmer if ((caps[5] & (byte)enumVoltages.VOLT_50V) != 0) { ProgrammerSupportedVoltage.Add("5.0 V"); } if ((caps[5] & (byte)enumVoltages.VOLT_33V) != 0) { ProgrammerSupportedVoltage.Add("3.3 V"); } if ((caps[5] & (byte)enumVoltages.VOLT_25V) != 0) { ProgrammerSupportedVoltage.Add("2.5 V"); } if ((caps[5] & (byte)enumVoltages.VOLT_18V) != 0) { ProgrammerSupportedVoltage.Add("1.8 V"); } ProgrammerSupportedConnectors.Clear(); ProgrammerSupportedConnectors.Add("5p"); ProgrammerSupportedConnectors.Add("10p"); ProgrammerSupportedClocks.Clear(); ProgrammerSupportedClocks.Add("24 MHz"); ProgrammerSupportedClocks.Add("16 MHz"); ProgrammerSupportedClocks.Add("12 MHz"); ProgrammerSupportedClocks.Add("8 MHz"); ProgrammerSupportedClocks.Add("6 MHz"); ProgrammerSupportedClocks.Add("3.2 MHz"); ProgrammerSupportedClocks.Add("3.0 MHz"); ProgrammerSupportedClocks.Add("1.6 MHz"); ProgrammerSupportedClocks.Add("1.5 MHz"); } else if (SelectedProgrammer.StartsWith("KitProg") && (PSoCProgrammerInstalled == true)) { ProgrammerSupportedVoltage.Add("5.0 V"); ProgrammerSupportedConnectors.Clear(); ProgrammerSupportedConnectors.Add("5p"); ProgrammerSupportedClocks.Clear(); ProgrammerSupportedClocks.Add("3.0 MHz"); } } }