Exemplo n.º 1
0
 public LedDriver(IGpioController controller, LedDriverSettings settings)
 {
     controller.ThrowIfNull(nameof(controller));
     settings.ThrowIfNull(nameof(settings));
     Controller = controller;
     Settings   = settings;
     SetUpController();
 }
Exemplo n.º 2
0
        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);
        }