Пример #1
0
        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();
 }
Пример #4
0
 public static MpsseSpiConfig Make(int speed, FtdiMpsseSpiSelectPin chipSelect = FtdiMpsseSpiSelectPin.CsDbus3)
 {
     return(MpsseSpiConfig.Init(speed, chipSelect));
 }
Пример #5
0
 public static MpsseSpiConfig GetDefault()
 {
     return(MpsseSpiConfig.Init(MpsseSpiConfig._30Mhz, FtdiMpsseSpiSelectPin.CsDbus3));
 }
Пример #6
0
 public extern static FtdiMpsseSPIResult SPI_InitChannel(IntPtr handle, ref MpsseSpiConfig config);