Board Class
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.
Base class for all board abstractions. A "board" is a piece of hardware that offers low-level interfaces to other devices. Typically, it has GPIO pins and one or multiple SPI or I2C busses. There should be exactly one instance of a board class per hardware component in an application, but it is possible to work with multiple boards at once (i.e. when having a GPIO expander connected to the Raspberry Pi)
public abstract class Board : MarshalByRefObject, IDisposable
type Board = class
inherit MarshalByRefObject
interface IDisposable
Public MustInherit Class Board
Inherits MarshalByRefObject
Implements IDisposable
- Inheritance
-
Board
- Derived
- Implements
Constructors
Board() |
Constructs a board instance with the default numbering scheme. |
Properties
DefaultPinNumberingScheme |
The default pin numbering scheme for this board. |
Disposed |
True if this instance is disposed. Any attempt to use it after this becomes true results in undefined behavior. |
Initialized |
True if the board instance is initialized |
Methods
ActivatePinMode(Int32, PinUsage) |
Override this method if something special needs to be done to use the pin for the given device. Many devices support multiple functions per Pin, but not at the same time, so that some kind of multiplexer needs to be set accordingly. |
Create() |
Create an instance of the best possible board abstraction. |
CreateGpioController() |
Return an instance of a GpioController for the current board |
CreateI2cBusCore(Int32, Int32[]) |
Create an instance of an I2C bus in a derived class |
CreateI2cDevice(I2cConnectionSettings) |
Create an I2C device instance on a default bus. |
CreateOrGetI2cBus(Int32, Int32[]) |
Create an I2C bus instance or return the existing instance for this bus |
CreateOrGetI2cBus(Int32) |
Create an I2C bus instance or return the existing instance for this bus |
CreatePwmChannel(Int32, Int32, Int32, Double, Int32, PinNumberingScheme) |
Creates a PWM channel |
CreatePwmChannel(Int32, Int32, Int32, Double) |
Creates a PWM channel for the default pin assignment |
CreateSimplePwmChannel(Int32, Int32, Int32, Double) |
Overriden by derived implementations to provide the PWM device |
CreateSimpleSpiDevice(SpiConnectionSettings, Int32[]) |
Overriden by derived implementations to create the base SPI device. |
CreateSpiDevice(SpiConnectionSettings, Int32[], PinNumberingScheme) |
Create an SPI device instance |
CreateSpiDevice(SpiConnectionSettings) |
Create an SPI device instance |
DetermineCurrentPinUsage(Int32) |
Returns the current usage of a pin |
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Dispose(Boolean) | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
GetDefaultI2cBusNumber() |
Creates the default I2C bus for this board or returns the existing bus |
GetDefaultPinAssignmentForI2c(Int32) |
Overriden by derived classes: Provides the default pin assignment for the given I2C bus |
GetDefaultPinAssignmentForPwm(Int32, Int32) |
Overriden by derived class. Provides the default pin for a given channel. |
GetDefaultPinAssignmentForSpi(SpiConnectionSettings) |
Overriden by derived classes: Provides the default pin assignment for the given SPI bus |
Initialize() |
Initialize the board and test whether it works on the current hardware. |
QueryComponentInformation() |
Query information about a component and its children. |
ReleasePin(Int32, PinUsage, Object) |
Removes the reservation for a pin. See ReservePin(Int32, PinUsage, Object) for details. |
ReservePin(Int32, PinUsage, Object) |
Reserves a pin for a specific usage. This is done automatically if a known interface (i.e. GpioController) is used to open the pin, but may be used to block a pin explicitly, i.e. for UART. |
TryCreateBestGpioDriver() |
Tries to create the best possible GPIO driver for this hardware. |