Class GpioService

java.lang.Object
com.kosdev.kos.core.service.gpio.GpioService

public final class GpioService extends Object
This service provides a way to interact with GPIO pins on the main cpu board. The GPIO adapter needs to be spawned which will then connect a session to this service.
Since:
9
Version:
9
  • Method Details

    • createInputPin

      public GpioInputPin createInputPin(GpioInputPinDef def)
      Create an input pin on the local node.
      Parameters:
      def - the input pin definition
      Since:
      9
    • createInputPin

      public GpioInputPin createInputPin(NodeId nodeId, GpioInputPinDef def)
      Create an input pin on the specified node.
      Parameters:
      nodeId - id of the node to create the pin on
      def - the input pin definition
      Since:
      9
    • createOutputPin

      public GpioOutputPin createOutputPin(GpioOutputPinDef def)
      Create an output pin on the local node.
      Parameters:
      def - the output pin definition
      Since:
      9
    • createOutputPin

      public GpioOutputPin createOutputPin(NodeId nodeId, GpioOutputPinDef def)
      Create an output pin on the specified node.
      Parameters:
      nodeId - id of the node to create the pin on
      def - the output pin definition
      Since:
      9
    • removePin

      public void removePin(GpioPin pin)
      Remove the specified pin.
      Parameters:
      pin - the pin to remove
      Since:
      9