Edit

Share via


RaspberryPi3Driver Class

Definition

A GPIO driver for the Raspberry Pi 3 or 4, running Raspbian (or, with some limitations, ubuntu)

public class RaspberryPi3Driver : System.Device.Gpio.GpioDriver
type RaspberryPi3Driver = class
    inherit GpioDriver
Public Class RaspberryPi3Driver
Inherits GpioDriver
Inheritance
RaspberryPi3Driver

Constructors

RaspberryPi3Driver()

Creates an instance of the RaspberryPi3Driver. This driver works on Raspberry 3 or 4, both on Linux and on Windows

Properties

AlternatePinModeSettingSupported

True if the driver supports SetAlternatePinMode(Int32, RaspberryPi3Driver+AltMode) and GetAlternatePinMode(Int32).

ClearRegister

Allows directly setting the "Set pin low" register. Used for special applications only

PinCount

The number of pins provided by the driver.

SetRegister

Allows directly setting the "Set pin high" register. Used for special applications only

Methods

AddCallbackForPinValueChangedEvent(Int32, PinEventTypes, PinChangeEventHandler)

Adds a handler for a pin value changed event.

ClosePin(Int32)

Closes an open pin.

ConvertPinNumberToLogicalNumberingScheme(Int32)

Converts a board pin number to the driver's logical numbering scheme.

Dispose()

Disposes this instance, closing all open pins

(Inherited from GpioDriver)
Dispose(Boolean)

Disposes this instance

GetAlternatePinMode(Int32)

Retrieve the current alternate pin mode for a given logical pin. This works also with closed pins.

GetPinMode(Int32)

Gets the mode of a pin.

IsPinModeSupported(Int32, PinMode)

Checks if a pin supports a specific mode.

OpenPin(Int32)

Opens a pin in order for it to be ready to use. The driver attempts to open the pin without changing its mode or value.

QueryComponentInformation()

Query information about a component and its children.

QueryComponentInformation()

Query information about a component and its children.

(Inherited from GpioDriver)
Read(Int32)

Reads the current value of a pin.

RemoveCallbackForPinValueChangedEvent(Int32, PinChangeEventHandler)

Removes a handler for a pin value changed event.

SetAlternatePinMode(Int32, RaspberryPi3Driver+AltMode)

Set the specified alternate mode for the given pin. Check the manual to know what each pin can do.

SetPinMode(Int32, PinMode, PinValue)

Sets the mode to a pin and sets an initial value for an output pin.

SetPinMode(Int32, PinMode, PinValue)

Sets the mode to a pin and sets an initial value for an output pin.

(Inherited from GpioDriver)
SetPinMode(Int32, PinMode)

Sets the mode to a pin.

Toggle(Int32)

Toggle the current value of a pin.

Toggle(Int32)

Toggle the current value of a pin.

(Inherited from GpioDriver)
WaitForEvent(Int32, PinEventTypes, CancellationToken)

Blocks execution until an event of type eventType is received or a cancellation is requested.

WaitForEventAsync(Int32, PinEventTypes, CancellationToken)

Async call until an event of type eventType is received or a cancellation is requested.

Write(Int32, PinValue)

Writes a value to a pin.

Applies to