예제 #1
0
        public override IAvrChannel CreateChannel()
        {
            var port      = ComPortSettings.CreateSerialPort();
            var spiMaster = new SpiMaster(port, ClkPin.CreatePin(port), MosiPin.CreatePin(port), MisoPin.CreatePin(port));

            return(new SpiMasterChannel(spiMaster, ResetPin.CreatePin(port)));
        }
예제 #2
0
 public ComBitBangConfig(string keyPrefix)
     : base(keyPrefix)
 {
     _comPortSettings = new ComPortSettings(keyPrefix);
     _resetPin        = new ComBitBangPinConfig(keyPrefix + "ResetPin.");
     _clkPin          = new ComBitBangPinConfig(keyPrefix + "ClkPin.");
     _mosiPin         = new ComBitBangPinConfig(keyPrefix + "MosiPin.");
     _misoPin         = new ComBitBangPinConfig(keyPrefix + "MisoPin.");
 }
예제 #3
0
 public StkV1Config(string keyPrefix)
     : base(keyPrefix)
 {
     _comPortSettings = new ComPortSettings(keyPrefix);
     _resetPin        = new ComBitBangPinConfig(keyPrefix + "ResetPin.");
 }
예제 #4
0
        public override IAvrChannel CreateChannel()
        {
            var port = ComPortSettings.CreateSerialPort();

            return(new SerialPortChannel(port, ResetPin.CreatePin(port)));
        }