Class TPU_DIO

    • Field Detail

      • channel

        int channel
      • diff

        int diff
    • Constructor Detail

      • TPU_DIO

        public TPU_DIO​(boolean tpuA,
                       int channel,
                       boolean out)
        Create a general purpose in- our output on a given channel.
        Parameters:
        tpuA - true: use TPU-A, false: use TPU-B.
        channel - TPU channel to initialize. Allowed values are 0..15.
        out - true initializes the channel as a digital output. false initializes the channel as a digital input.
    • Method Detail

      • get

        public boolean get()
        Returns the current state of the TTL signal.
        Specified by:
        get in interface DigitalInput
        Returns:
        the current state of the TTL at the given pin. true means logic 1 and false logic 0.
      • set

        public void set​(boolean val)
        Set the TTL signal.
        Specified by:
        set in interface DigitalOutput
        Parameters:
        val - Value to set. true means logic 1 and false logic 0.
      • dir

        public void dir​(boolean out)
        Sets the direction of a given channel to input or output.
        Parameters:
        out - Pin usage: true configures the pin as output, false as input.