public Hal() { _battery = new BatteryDriver(); _com = new ComDriver(); _serial = new SerialDriver(); _spi = new SpiDriver(); _time = new TimeDriver(); _lcd = new LcdDriver(); _gpio = new GpioDriver(); _events = new EventsDriver(); _usb = new UsbDriver(); _memory = new MemoryDriver(); _sockets = new SocketsDriver(); _ssl = new SslDriver((SocketsDriver)_sockets); _i2c = new I2cDriver(); _touchPanel = new TouchPanelDriver(); _fileSystem = new FSDriver(); _blockStorageDevices = new BlockStorageDriver(); _watchdog = new WatchdogDriver(); _session = new SessionDriver(); _encryption = new EncryptionDriver(); _digest = new DigestDriver(); _signature = new SignatureDriver(); _keyManagement = new KeyManagementDriver(); _cryptokiObjectMgr = new CryptokiObjectMgrDriver(); _random = new RandomDriver(); _updateProvider = new UpdateProvider(); _updateStorage = new UpdateStorageProvider(); _updateBackup = new UpdateBackupProvider(); _updateValidation = new UpdateValidationProvider(); }
public static async Task <OutputPort> Create(int pin, InitialValue initial, IGpioDriver driver = null) { var port = await Create(pin, driver ?? new FileDriver()); await port.SetDirection(initial == InitialValue.High?GpioDirection.High : GpioDirection.Low); return(port); }
public static async Task <OutputPort> Create(int pin, IGpioDriver driver = null) { var port = new OutputPort(pin, driver ?? new FileDriver()); // If port already exists delete and recreate it if (Directory.Exists(GpioPath.Path(pin))) { await port.UnAssignPin(); } await port.AssignPin(); await port.SetDirection(GpioDirection.Out); return(port); }
public static async Task <InputPort> Create(int pin, GpioEdge edge, IGpioDriver driver = null) { var port = new InputPort(pin, driver ?? new FileDriver()); // If port already exists delete and recreate it if (Directory.Exists(GpioPath.Path(pin))) { await port.UnAssignPin(); } await port.AssignPin(); await port.SetDirection(); await port.SetEdge(edge); port.SetupInterrupt(); return(port); }
public Hal() { _battery = new BatteryDriver(); _com = new ComDriver(); _serial = new SerialDriver(); _spi = new SpiDriver(); _time = new TimeDriver(); _lcd = new LcdDriver(); _gpio = new GpioDriver(); _events = new EventsDriver(); _usb = new UsbDriver(); _memory = new MemoryDriver(); _sockets = new SocketsDriver(); _ssl = new SslDriver((SocketsDriver)_sockets); _i2c = new I2cDriver(); _touchPanel = new TouchPanelDriver(); _fileSystem = new FSDriver(); _blockStorageDevices = new BlockStorageDriver(); _watchdog = new WatchdogDriver(); }
private OutputPort(int pin, IGpioDriver driver) { _driver = driver; _pin = pin.ToString(CultureInfo.InvariantCulture); }
public static async Task <GpioTrigger> Create(IGpioDriver driver, int gpioPin) { var port = await InputPort.Create(gpioPin, GpioEdge.Both, driver); return(new GpioTrigger(port)); }
public static async Task <GpioSwitch> Create(IGpioDriver driver, int gpioPin, bool lowIsOff, IObservable <bool> onOffTrigger) { var port = await OutputPort.Create(gpioPin, lowIsOff?OutputPort.InitialValue.Low : OutputPort.InitialValue.High, driver); return(new GpioSwitch(port, onOffTrigger)); }