Treehopper C# API
IPortExpanderPin Interface Reference

A port expander pin More...

Inheritance diagram for IPortExpanderPin:
DigitalIO DigitalIn DigitalOut DigitalBase DigitalBase PortExpanderPin Mcp23008.Pin

Public Member Functions

Task< bool > AwaitDigitalValueChangeAsync ()
 Awaits until the digital value changes More...
 
Task MakeDigitalInAsync ()
 Make the pin a digital input More...
 
Task ToggleOutputAsync ()
 Toggle the output's value More...
 
Task MakeDigitalPushPullOutAsync ()
 Make the pin a push-pull output More...
 

Properties

PortExpanderPinMode Mode [get, set]
 The mode to use with this port expander pin More...
 
int PinNumber [get]
 The pin (bit) number of this port expander pin More...
 
bool DigitalValue [get]
 Get or set the DigitalValue of the pin More...
 
new bool DigitalValue [get, set]
 Get or set the digital value of the pin More...
 

Events

OnDigitalInValueChanged DigitalValueChanged
 Fires whenever the digital pin's input changes value More...
 

Detailed Description

A port expander pin

Member Function Documentation

◆ AwaitDigitalValueChangeAsync()

Task<bool> AwaitDigitalValueChangeAsync ( )
inherited

Awaits until the digital value changes

Returns
An awaitable bool of the new value

Implemented in Pin, PortExpanderPin, and DigitalInPeripheralPin.

◆ MakeDigitalInAsync()

Task MakeDigitalInAsync ( )
inherited

Make the pin a digital input

Implemented in Pin, PortExpanderPin, and DigitalInPeripheralPin.

◆ ToggleOutputAsync()

Task ToggleOutputAsync ( )
inherited

Toggle the output's value

Implemented in Pin, PortExpanderPin, and ShiftOutPin.

◆ MakeDigitalPushPullOutAsync()

Task MakeDigitalPushPullOutAsync ( )
inherited

Make the pin a push-pull output

Implemented in Pin, PortExpanderPin, and ShiftOutPin.

Property Documentation

◆ Mode

PortExpanderPinMode Mode
getset

The mode to use with this port expander pin

◆ PinNumber

int PinNumber
get

The pin (bit) number of this port expander pin

◆ DigitalValue [1/2]

bool DigitalValue
getinherited

Get or set the DigitalValue of the pin

◆ DigitalValue [2/2]

new bool DigitalValue
getsetinherited

Get or set the digital value of the pin

Event Documentation

◆ DigitalValueChanged

OnDigitalInValueChanged DigitalValueChanged
inherited

Fires whenever the digital pin's input changes value


The documentation for this interface was generated from the following file: