Edit

Share via


Board.CreateGpioController Method

Definition

Return an instance of a GpioController for the current board

public virtual System.Device.Gpio.GpioController CreateGpioController ();
abstract member CreateGpioController : unit -> System.Device.Gpio.GpioController
override this.CreateGpioController : unit -> System.Device.Gpio.GpioController
Public Overridable Function CreateGpioController () As GpioController

Returns

An instance of a GpioController. The controller uses pin management to prevent reusing the same pin for different purposes (or for purposes for which it is not suitable)

Exceptions

Rare: No GPIO Controller was found for the current hardware. The default implementation will return a simulation interface if no hardware is available.

Remarks

Derived classes should not normally override this method, but instead TryCreateBestGpioDriver().

Applies to