Esempio n. 1
0
        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
        }
Esempio n. 2
0
        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
        }
Esempio n. 3
0
 /// <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)
 {
 }
Esempio n. 4
0
 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);
Esempio n. 5
0
 private static extern FtStatus FT_GetDeviceInfo(
     IntPtr ftHandle,
     ref FtDevice pftType,
     ref UInt32 lpdwId,
     byte[] pcSerialNumber,
     byte[] pcDescription,
     IntPtr pvDummy);