public interface Gpio extends MetaWearBoard.Module
Modifier and Type | Interface and Description |
---|---|
static interface |
Gpio.AnalogInParameterBuilder
Builder to construct parameters for the enhanced analog input read.
|
static class |
Gpio.AnalogReadMode
Read modes for analog input
|
static class |
Gpio.PinChangeType
Pin change types
|
static class |
Gpio.PullMode
Input pin configuration types
|
static interface |
Gpio.SourceSelector
Selector for available Gpio data sources
|
Modifier and Type | Method and Description |
---|---|
void |
clearDigitalOut(byte pin)
Clears the digital output state of a pin
|
Gpio.AnalogInParameterBuilder |
initiateAnalogInRead(byte pin,
Gpio.AnalogReadMode mode)
Enhanced version of the readAnalogIn functions that combines analog reads with pullup/pulldown commands
in one function.
|
void |
readAnalogIn(byte pin,
Gpio.AnalogReadMode mode)
Read the analog input voltage
|
void |
readAnalogIn(byte pin,
Gpio.AnalogReadMode mode,
boolean silent)
Read the analog input voltage
|
void |
readDigitalIn(byte pin)
Read the digital input state
|
void |
readDigitalIn(byte pin,
boolean silent)
Read the digital input state
|
Gpio.SourceSelector |
routeData()
Initiates the creation of a route for gpio data
|
void |
setDigitalOut(byte pin)
Sets the digital output state of a pin
|
void |
setPinChangeType(byte pin,
Gpio.PinChangeType type)
Sets change type to monitor
|
void |
setPinPullMode(byte pin,
Gpio.PullMode mode)
Sets pull mode on a pin
|
void |
startPinChangeDetection(byte pin)
Starts pin change detection
|
void |
stopPinChangeDetection(byte pin)
Stops pin change detection
|
void readAnalogIn(byte pin, Gpio.AnalogReadMode mode)
pin
- GPIO pin to readmode
- Analog read modevoid readAnalogIn(byte pin, Gpio.AnalogReadMode mode, boolean silent)
pin
- GPIO pin to readmode
- Analog read modeGpio.AnalogInParameterBuilder initiateAnalogInRead(byte pin, Gpio.AnalogReadMode mode)
pin
- GPIO pin to readmode
- Analog read modevoid setPinPullMode(byte pin, Gpio.PullMode mode)
pin
- GPIO pin to configuremode
- New pull modevoid readDigitalIn(byte pin)
pin
- GPIO pin to readvoid readDigitalIn(byte pin, boolean silent)
pin
- GPIO pin to readsilent
- True if read should be silentvoid setDigitalOut(byte pin)
pin
- GPIO pin to setvoid clearDigitalOut(byte pin)
pin
- GPIO pin to clearvoid setPinChangeType(byte pin, Gpio.PinChangeType type)
pin
- GPIO pin to configuretype
- Change type to monitorvoid startPinChangeDetection(byte pin)
pin
- GPIO pin to monitorvoid stopPinChangeDetection(byte pin)
pin
- GPIO pin to stop monitoringGpio.SourceSelector routeData()