コード例 #1
0
 public void Dispose()
 {
     Output?.Dispose();
     Input?.Dispose();
     LedDevice?.Dispose();
     Visualizer?.Stop(true);
     VisualizingOutput?.Stop(true);
     VisualizingOutput?.Dispose();
 }
コード例 #2
0
        /// <summary>
        /// Creates an instance.
        /// </summary>
        public FeatherBoard()
        {
            try
            {
                // Initialize hardware
                HardwareProvider.Initialize();

                // Initialize components
                Network = WifiDevice.Initialize();
                Led     = new LedDevice(SC20100.GpioPin.PE11);
            }
            catch
            {
                // Close devices in case partially initialized
                Network?.Dispose();

                // Continue error
                throw;
            }
        }
コード例 #3
0
        /// <summary>
        /// Creates an instance.
        /// </summary>
        public DuinoBoard()
        {
            try
            {
                // Initialize hardware
                HardwareProvider.Initialize();

                // Initialize components
                Network = WifiDevice.Initialize();
                Storage = CardDevice.Connect(SC20100.StorageController.SdCard);
                Led     = new LedDevice(SC20100.GpioPin.PE11);
            }
            catch
            {
                // Close devices in case partially initialized
                Network?.Dispose();
                Storage?.Dispose();

                // Continue error
                throw;
            }
        }