/// <summary> /// Creates a GPIO Driver /// </summary> /// <param name="deviceInformation">The FT232H device</param> internal Ft232HGpio(Ft232HDevice deviceInformation) { DeviceInformation = deviceInformation; // Open device DeviceInformation.GetHandle(); DeviceInformation.InitializeGpio(); }
internal Ft232HSpi(SpiConnectionSettings settings, Ft232HDevice deviceInformation) { DeviceInformation = deviceInformation; _settings = settings; if ((_settings.ChipSelectLine < 3) || (_settings.ChipSelectLine > Ft232HDevice.PinCountConst)) { throw new ArgumentException($"Chip Select line has to be between 3 and {Ft232HDevice.PinCountConst - 1}"); } if (DeviceInformation.ConnectionSettings.Where(m => m.ChipSelectLine == _settings.ChipSelectLine).Any()) { throw new ArgumentException("Chip Select already in use"); } // Open the device DeviceInformation.ConnectionSettings.Add(_settings); DeviceInformation.SpiInitialize(); }
/// <summary> /// Creates anI2C Bus /// </summary> /// <param name="deviceInformation">a FT232H device</param> public Ft232HI2cBus(Ft232HDevice deviceInformation) { DeviceInformation = deviceInformation; DeviceInformation.I2cInitialize(); }