Interface DigoutPinConfig
- All Known Implementing Classes:
DataSource
,DigoutPinConfig.RawConfigValue
Interface that holds the output configuration for a physical digital output pin (digout)
Digout pins can be set into one of three modes:
- disabled (via
kDisabled
) - outputting high or low depending on the values of digout slots that combine to form a boolean expression
(via
kDigoutLogicActiveLow
andkDigoutLogicActiveHigh
-- for more information, seeDigoutChannel
) - a duty cycle/PWM output of values from either the color or proximity sensor via
DataSource
(only works on digout 2)
DigoutChannel.configureOutputPin(DigoutPinConfig)
for example usage.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final record
Represents a raw config value. -
Field Summary
Modifier and TypeFieldDescriptionstatic final DigoutPinConfig
Sets the digout GPIO pin to use the associateddigout channel's
value, with 3.3v as true and 0v as false.static final DigoutPinConfig
Sets the digout GPIO pin to use the associateddigout channel's
value, with 0v as true and 3.3v as false.static final DigoutPinConfig
Disables all output on this digout GPIO pin. -
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(DigoutPinConfig other) Returns if two configurations are equivalent.static DigoutPinConfig
fromSettingData
(long value) Unserializes the digout config from setting data to an object.long
Serializes the digout config into a value writeable to device settings.
-
Field Details
-
kDisabled
Disables all output on this digout GPIO pin. -
kDigoutLogicActiveHigh
Sets the digout GPIO pin to use the associateddigout channel's
value, with 3.3v as true and 0v as false. -
kDigoutLogicActiveLow
Sets the digout GPIO pin to use the associateddigout channel's
value, with 0v as true and 3.3v as false.
-
-
Method Details
-
toOutputSettingData
long toOutputSettingData()Serializes the digout config into a value writeable to device settings.- Returns:
- 48-bit long
-
equals
Returns if two configurations are equivalent.- Parameters:
other
- other config- Returns:
- true if equal
-
fromSettingData
Unserializes the digout config from setting data to an object.- Parameters:
value
- setting data- Returns:
- config object
-