public LedDriver(IGpioController controller, LedDriverSettings settings) { controller.ThrowIfNull(nameof(controller)); settings.ThrowIfNull(nameof(settings)); Controller = controller; Settings = settings; SetUpController(); }
public static LedDriver Create(LedDriverSettings settings) { settings.ThrowIfNull(nameof(settings)); var controller = new GpioControllerWrapper(new GpioController(PinNumberingScheme.Logical)); var driver = new LedDriver(controller, settings); driver.ownsController = true; return(driver); }