Mcp23018 Class

Definition

Driver for the Microchip MCP23018 16-Bit I/O Expander with Open-Drain Outputs.

public class Mcp23018 : Iot.Device.Mcp23xxx.Mcp23x1x
type Mcp23018 = class
    inherit Mcp23x1x
Public Class Mcp23018
Inherits Mcp23x1x
Inheritance

Constructors

Mcp23018(I2cDevice, Int32, Int32, Int32, GpioController)
Mcp23018(I2cDevice, Int32, Int32, Int32, GpioController, Boolean)

Initializes a new instance of the Mcp23018 device.

Fields

_bus

Bus adapter (I2C/SPI) used to communicate with the device

(Inherited from Mcp23xxx)

Properties

PinCount

The number of pins provided by the driver.

(Inherited from Mcp23x1x)

Methods

AddCallbackForPinValueChangedEvent(Int32, PinEventTypes, PinChangeEventHandler)

Adds a handler for a pin value changed event.

(Inherited from Mcp23xxx)
ClosePin(Int32)

Closes an open pin.

(Inherited from Mcp23xxx)
ConvertPinNumberToLogicalNumberingScheme(Int32)

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

(Inherited from Mcp23xxx)
Disable()

Disables the device by setting the reset pin low.

(Inherited from Mcp23xxx)
Dispose()

Disposes this instance, closing all open pins

(Inherited from GpioDriver)
Dispose(Boolean)

Disposes this instance

(Inherited from Mcp23xxx)
Enable()

Enables the device by setting the reset pin high.

(Inherited from Mcp23xxx)
GetPinMode(Int32)

Gets the mode of a pin.

(Inherited from Mcp23xxx)
InternalRead(Register, Span<Byte>, Port)

Reads a number of bytes from registers.

(Inherited from Mcp23xxx)
InternalReadByte(Register, Port)

Reads byte from the device register

(Inherited from Mcp23xxx)
InternalReadInterrupt(Port)

Reads interrupt value

(Inherited from Mcp23xxx)
InternalReadUInt16(Register)

Read 16-bit unsigned integer from the device register

(Inherited from Mcp23xxx)
InternalWrite(Register, Span<Byte>, Port)

Writes a number of bytes to registers.

(Inherited from Mcp23xxx)
InternalWriteByte(Register, Byte, Port)

Write byte to device register

(Inherited from Mcp23xxx)
InternalWriteUInt16(Register, UInt16)

Writes 16-bit unsigned integer to the device register

(Inherited from Mcp23xxx)
IsPinModeSupported(Int32, PinMode)

Checks if a pin supports a specific mode.

(Inherited from Mcp23xxx)
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.

(Inherited from Mcp23xxx)
QueryComponentInformation()

Query information about a component and its children.

(Inherited from GpioDriver)
Read(Int32)

Reads the value of a pin.

(Inherited from Mcp23xxx)
Read(Span<PinValuePair>)

Reads the value of a set of pins

(Inherited from Mcp23xxx)
ReadByte(Register)

Read a byte from the given register.

(Inherited from Mcp23xxx)
ReadByte(Register, Port)

Read a byte from the given register on the given port.

(Inherited from Mcp23x1x)
ReadInterrupt()

Returns the value of the interrupt pin if configured.

(Inherited from Mcp23xxx)
ReadInterrupt(Port)

Reads the interrupt pin for the given port if configured.

(Inherited from Mcp23x1x)
ReadUInt16(Register)

Read a ushort from the given register.

(Inherited from Mcp23x1x)
RemoveCallbackForPinValueChangedEvent(Int32, PinChangeEventHandler)

Removes a handler for a pin value changed event.

(Inherited from Mcp23xxx)
SetPinMode(Int32, PinMode)

Sets a mode to a pin.

(Inherited from Mcp23xxx)
SetPinMode(Int32, PinMode, PinValue)

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

(Inherited from GpioDriver)
Toggle(Int32)

Toggle the current value of a pin.

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

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

(Inherited from Mcp23xxx)
WaitForEventAsync(Int32, PinEventTypes, CancellationToken)

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

(Inherited from GpioDriver)
Write(Int32, PinValue)

Writes a value to a pin.

(Inherited from Mcp23xxx)
Write(ReadOnlySpan<PinValuePair>)

Writes values to a set of pins

(Inherited from Mcp23xxx)
WriteByte(Register, Byte)

Write a byte to the given register.

(Inherited from Mcp23xxx)
WriteByte(Register, Byte, Port)

Write a byte to the given register on the given port.

(Inherited from Mcp23x1x)
WriteUInt16(Register, UInt16)

Write a ushort to the given register. Writes the value to both ports.

(Inherited from Mcp23x1x)

Applies to