public GpioStatus InitializeGpios() { if (Gpios != null && GpioPins != null) { for (int i = 0; i < GpioPins.Count(); i++) { Gpios.Add(InitGpioOutput(GpioPins[i])); if (Gpios[i] == null) { return(GpioStatus.NoPin); } } } return(GpioStatus.Success); }
public Hardware(Int32[] pins) { if (GpioPins == null) { GpioPins = pins == null ? new List <int>() : new List <int>(pins); Gpios = new List <GpioPin>(); } else { if (pins != null) { foreach (var pin in pins) { GpioPins.Add(pin); Gpios.Add(InitGpioOutput(pin)); } } } }