Board.CreateGpioController Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for