Beispiel #1
0
        private void SetPinResistorSetting(FX3PinResistorSetting setting)
        {
            List <IPinObject> pins = new List <IPinObject>();

            FX3.BitBangSpiConfig = new BitBangSpiConfig(true);
            pins.Add(FX3.DIO1);
            pins.Add(FX3.DIO2);
            pins.Add(FX3.DIO3);
            pins.Add(FX3.DIO4);
            pins.Add(FX3.FX3_GPIO1);
            pins.Add(FX3.FX3_GPIO2);
            pins.Add(FX3.FX3_GPIO3);
            pins.Add(FX3.FX3_GPIO4);
            pins.Add(FX3.BitBangSpiConfig.CS);
            pins.Add(FX3.BitBangSpiConfig.SCLK);
            pins.Add(FX3.BitBangSpiConfig.MISO);
            pins.Add(FX3.BitBangSpiConfig.MOSI);
            pins.Add(FX3.ResetPin);
            //uart
            pins.Add(new FX3PinObject(48));
            foreach (IPinObject pin in  pins)
            {
                /* Read each pin to set as input */
                FX3.ReadPin(pin);
                FX3.SetPinResistorSetting(pin, setting);
            }
        }