Package io.openems.edge.io.gpio.hardware
Class ModBerryX500CM4
java.lang.Object
io.openems.edge.io.gpio.hardware.ModBerryX500CM4
- All Implemented Interfaces:
HardwarePlatform
- Direct Known Subclasses:
ModberryX500M40804Max
,ModberryX500M40804W
,ModberryX500M40804Wb
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createPinObjects
(List<ChannelId> channelIds) Creates pin objects based on hardware enum description.getGpioValueByChannelId
(AbstractGpioChannel channelId) Gets the value of a GPIO pin based on the given channel.void
setGpio
(WriteChannelId channelId, boolean value) Sets the value of a GPIO based.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.io.gpio.hardware.HardwarePlatform
getAllChannelIds, getReadChannelIds, getWriteChannelIds
-
Constructor Details
-
ModBerryX500CM4
-
-
Method Details
-
createPinObjects
Description copied from interface:HardwarePlatform
Creates pin objects based on hardware enum description.- Specified by:
createPinObjects
in interfaceHardwarePlatform
- Parameters:
channelIds
- List of hardware description values. Each of the will be exported as a channel.
-
getGpioValueByChannelId
Description copied from interface:HardwarePlatform
Gets the value of a GPIO pin based on the given channel.- Specified by:
getGpioValueByChannelId
in interfaceHardwarePlatform
- Parameters:
channelId
- hardware channel to be queried.- Returns:
- the value of the digital IO.
true
if high, otherwisefalse
.
-
setGpio
Description copied from interface:HardwarePlatform
Sets the value of a GPIO based.- Specified by:
setGpio
in interfaceHardwarePlatform
- Parameters:
channelId
- hardware channel to setvalue
- the new requested value. In case of digital IOs, the value should beboolean
.- Throws:
OpenemsException
- thrown in the case if there is an OS/Hardware failure.
-