示例#1
0
        public GpioCore(AvailablePins _availablePins, bool _gracefullShutdownRequested = true)
        {
            AvailablePins = _availablePins;
            IsGracefullShutdownRequested = _gracefullShutdownRequested;

            PinController       = new PinController(this);
            EventManager        = new EventManager(this);
            MorseTranslator     = new MorseRelayTranslator(this);
            BluetoothController = new BluetoothController(this);
            SoundController     = new SoundController(this);
            ConfigManager       = new PinConfigManager(this);
        }
示例#2
0
 internal GpioCore(PinsWrapper pins, Core core, bool shouldGracefullyShutdown = true)
 {
     Core = core ?? throw new ArgumentNullException(nameof(core));
     Pins = pins;
     IsGracefullShutdownRequested = shouldGracefullyShutdown;
     PinController       = new PinController(this);
     EventGenerator      = new InternalEventGenerator(Core, PinController.GetDriver());
     MorseTranslator     = new MorseRelayTranslator(this);
     BluetoothController = new BluetoothController(this);
     SoundController     = new SoundController(this);
     PinConfig           = new PinConfig();
 }