Ejemplo n.º 1
0
        public bool Down_Fw(String Fw_Path)
        {
            bool Success;

            Fw = MyUsbList["Cypress USB BootLoader"] as CyFX2Device;
            if (Fw != null)
            {
                Success = Fw.LoadRAM(Fw_Path);
            }
            else
            {
                Fw      = MyUsbList["Cypress USB StreamerExample"] as CyFX2Device;
                Success = Fw.LoadRAM(Fw_Path);
            }
            return(Success);
        }
Ejemplo n.º 2
0
 private void ConfigFX2Device(string FileName, CyUSBDevice myDevice)
 {
     if (MyDevice != null)
     {
         CyFX2Device fx2 = myDevice as CyFX2Device;
         if (fx2 == null)
         {
             MessageBox.Show("Please check whether the device is FX2 device", "Device ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
         }
         bool bResult = fx2.LoadRAM(FileName);
         if (bResult)
         {
             tbxInfo.AppendText("Config FX2 Device successfully\n");
         }
         else
         {
             MessageBox.Show("Please check the config files", "File ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
     else
     {
         MessageBox.Show("Please select the USB device", "Device ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }