private async void cbFlowControl_SelectionChanged(object sender, SelectionChangedEventArgs e) { #if DAVE if (FtDevice == null) { return; } ComboBoxItem fc = (ComboBoxItem)cbFlowControl.SelectedItem; FLOW_CONTROL flowControl = (FLOW_CONTROL)Enum.Parse(typeof(FLOW_CONTROL), (String)fc.Tag); await FtDevice.SetFlowControl(flowControl, 0x00, 0x00); #endif }
private async void cbBaudRate_SelectionChanged(object sender, SelectionChangedEventArgs e) { #if DAVE if (FtDevice == null) { return; } ComboBoxItem br = (ComboBoxItem)cbBaudRate.SelectedItem; UInt32 baudRate = Convert.ToUInt32(br.Content); await FtDevice.SetBaudRate(baudRate); #endif }
/// <summary> /// Instantiates a FT232H device object. /// </summary> /// <param name="ftDevice">a FT Device</param> public Ft232HDevice(FtDevice ftDevice) : base(ftDevice.Flags, ftDevice.Type, ftDevice.Id, ftDevice.LocId, ftDevice.SerialNumber, ftDevice.Description) { }
private static extern FtStatus FT_GetDeviceInfoDetail( UInt32 index, ref UInt32 flags, ref FtDevice chiptype, ref UInt32 id, ref UInt32 locid, byte[] serialnumber, byte[] description, ref IntPtr ftHandle);
private static extern FtStatus FT_GetDeviceInfo( IntPtr ftHandle, ref FtDevice pftType, ref UInt32 lpdwId, byte[] pcSerialNumber, byte[] pcDescription, IntPtr pvDummy);