Inheritance: CommunicationsChannel
Example #1
0
        public LokiInfo GetLokiInfo()
        {
            HIDCommunicationsChannel channel = this._channel as HIDCommunicationsChannel;
            LokiInfo loki = new LokiInfo(
                string.Format("{0} {1} [{2:X}, {3:X}]", channel.Device.Manufacturer, channel.Device.Product, channel.Device.VendorID, channel.Device.ProductID),
                string.Format("{0:X}.{1:X}", this.SiliconId, this.SiliconRev),
                this.bootloaderVersion,
                LOKI_EEPROM_ADDR);

            try
            {
                loki.Deserialize(this.OpenEEPROM(LOKI_EEPROM_ADDR, 65536));
            }
            catch (BoardInfoFormatException) { }
            return(loki);
        }
Example #2
0
        public void GetHidDevice()
        {
            CyHidDevice device = usbHIDDevices[VID, PID] as CyHidDevice;

            if (device != null)
            {
                channel = new HIDCommunicationsChannel(device);
                host    = new LokiBootloaderHost(channel);
                host.EnterBootloader();
                this.UseWaitCursor = true;
                readEEPROMWorker.RunWorkerAsync();
            }
            else
            {
                OnDetach();
            }
        }
Example #3
0
        public void GetHidDevice()
        {
            CyHidDevice device = usbHIDDevices[VID, PID] as CyHidDevice;

            if (device != null)
            {
                channel = new HIDCommunicationsChannel(device);
                host = new LokiBootloaderHost(channel);
                host.EnterBootloader();
                this.UseWaitCursor = true;
                readEEPROMWorker.RunWorkerAsync();
            }
            else
            {
                OnDetach();
            }
        }