public static MpsseSpiConfig Init(int clockRate, FtdiMpsseSpiSelectPin selectPin) { var f = new MpsseSpiConfig(); f.ClockRate = clockRate; f.LatencyTimer = 1; f.spiConfigOptions = FtdiMpsseSpiConfigOptions.Mode0 | FtdiMpsseSpiConfigOptions.CsActivelow | ((FtdiMpsseSpiConfigOptions)selectPin); return(f); }
protected GpioSpiDeviceBaseClass(MpsseSpiConfig spiConfig, MpsseChannelConfiguration channelConfig) { this._ftdiMpsseChannelConfig = channelConfig ?? MpsseChannelConfiguration.FtdiMpsseChannelZeroConfiguration; this._spiConfig = spiConfig; this.InitLibAndHandle(); }
protected GpioSpiDeviceBaseClass(MpsseSpiConfig spiConfig) : this(spiConfig, null) { this.GpioInit(); }
public static MpsseSpiConfig Make(int speed, FtdiMpsseSpiSelectPin chipSelect = FtdiMpsseSpiSelectPin.CsDbus3) { return(MpsseSpiConfig.Init(speed, chipSelect)); }
public static MpsseSpiConfig GetDefault() { return(MpsseSpiConfig.Init(MpsseSpiConfig._30Mhz, FtdiMpsseSpiSelectPin.CsDbus3)); }
public extern static FtdiMpsseSPIResult SPI_InitChannel(IntPtr handle, ref MpsseSpiConfig config);