Exemplo n.º 1
0
        private async void ProgramEEPROM()
        {
            if (myDevice == null)
            {
                return;
            }

            if (myDevice.DeviceInfoNode.DeviceType != DEVICE_TYPE.FT232R)
            {
                return;
            }

            FT232R_EEPROM ee = new FT232R_EEPROM();

            ee.VendorID                 = 0x0403;
            ee.ProductID                = 0x6001;
            ee.LoadVCP                  = true;
            ee.Manufacturer             = "FTDI";
            ee.Product                  = "FT232R";
            ee.SerialNumber             = "FT7654321";
            ee.SerialNumberEnable       = true;
            ee.UsbVersion               = USB_VERSION.USB_20;
            ee.SelfPowered              = false;
            ee.RemoteWakeupEnable       = false;
            ee.PullDownEnable           = false;
            ee.MaxPower                 = 500;
            ee.InvertTXD                = false;
            ee.InvertRXD                = false;
            ee.InvertRTS                = false;
            ee.InvertRI                 = false;
            ee.InvertDTR                = false;
            ee.InvertDSR                = false;
            ee.InvertDCD                = false;
            ee.InvertCTS                = false;
            ee.HighIO                   = false;
            ee.ExternalOscillatorEnable = false;
            ee.CBus4 = FTDI.D2xx.WinRT.Device.EEPROM.FT232R.CBUS_SIGNALS.TXDEN;
            ee.CBus3 = FTDI.D2xx.WinRT.Device.EEPROM.FT232R.CBUS_SIGNALS.TXDEN;
            ee.CBus2 = FTDI.D2xx.WinRT.Device.EEPROM.FT232R.CBUS_SIGNALS.TXDEN;
            ee.CBus1 = FTDI.D2xx.WinRT.Device.EEPROM.FT232R.CBUS_SIGNALS.TXDEN;
            ee.CBus0 = FTDI.D2xx.WinRT.Device.EEPROM.FT232R.CBUS_SIGNALS.TXDEN;

            await myDevice.EepromProgramAsync(ee);
        }