public void Dispose() { Output?.Dispose(); Input?.Dispose(); LedDevice?.Dispose(); Visualizer?.Stop(true); VisualizingOutput?.Stop(true); VisualizingOutput?.Dispose(); }
/// <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; } }
/// <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; } }