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
kDigoutLogicActiveLowandkDigoutLogicActiveHigh-- 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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordRepresents a raw config value. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DigoutPinConfigSets the digout GPIO pin to use the associateddigout channel'svalue, with 3.3v as true and 0v as false.static final DigoutPinConfigSets the digout GPIO pin to use the associateddigout channel'svalue, with 0v as true and 3.3v as false.static final DigoutPinConfigDisables all output on this digout GPIO pin. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(DigoutPinConfig other) Returns if two configurations are equivalent.static DigoutPinConfigfromSettingData(long value) Unserializes the digout config from setting data to an object.longSerializes 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'svalue, with 3.3v as true and 0v as false. -
kDigoutLogicActiveLow
Sets the digout GPIO pin to use the associateddigout channel'svalue, 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
-