Set the direction of the pin (input or output)

@param int $pin The BCM pin number
@param string $direction The type/direction of the pin - Use GPIO::IN and GPIO::OUT
@param bool $invert Invert the logic so that high->low and low->high
@return bool
336587
public function setDirection(int $pin, string $direction, bool $invert = false): bool
    {
        return true;
    }
1296426
def set_gpio_pin(self, pin_number, setting, dest_addr_long=None):
        
        assert setting in const.GPIO_SETTINGS.values()
        self._send_and_wait(
            command=const.IO_PIN_COMMANDS[pin_number],
            parameter=setting.value,
            dest_addr_long=dest_addr_long)
1272752
public function readKeys($offset, $direction, $hints = Parser::HINT_NONE)
    {
        // If reading backwards, shift the offset left
        $shiftedOffset = $direction == self::DIRECTION_BACKWARD
                ? $offset - $this->getReadLength()
                : $offset;
        
        //TODO shift to a blocksize chunk
        
        // Don't shift too far
        if ($shiftedOffset < 0) {
            $shiftedOffset = 0;

        }
        
        // Read data
        \fseek($this->index->getFile()->getFilePointer(), $shiftedOffset);
        $data = \fread(
            $this->index->getFile()->getFilePointer(),
            $this->getReadLength()
        );
        if ($data === false) {
            if (\feof($this->index->getFile()->getFilePointer())) {
                return array();

            } else {
                throw new IOIndexException("Could not read file");

            }
        }
        
        // Parse the read data
        $keys = $this->index->getParser()->parseKeys($data, $shiftedOffset, $hints);
        
        // Read more data if no keys were found
        if (empty($keys)) {
            // Only increase if there exists more data
            if ($direction == self::DIRECTION_BACKWARD && $shiftedOffset == 0) {
                return array();
                
            } elseif ($direction == self::DIRECTION_FORWARD
                        && $shiftedOffset + $this->getReadLength()
                           >= $this->index->getFile()->getFileSize()
            ) {
                return array();
                
            }
            
            $this->increaseReadLength();
            return $this->readKeys($offset, $direction);
            
        }
        
        return $keys;
    }
599862
public static function parseDirection($direction = Order::ASC)
    {
        if (preg_match('/^asc$/i', $direction)) {
            return Order::ASC;
        } else {
            return Order::DESC;
        }
    }
255756
public function invert($index = 0) {
		$pcs = $this->bits;
		$pcs = \ianring\BitmaskUtils::reflectBitmask($pcs);
		$pcs = \ianring\BitmaskUtils::rotateBitmask($pcs, -1, 1);
		$pcs = \ianring\BitmaskUtils::rotateBitmask($pcs, 0, $index);
		$this->bits = $pcs;
	}
717543
public void setPercentValue(Pin pin, Number percent){
        // validate range
        if(percent.doubleValue() <= 0){
            setValue(pin, getMinSupportedValue());
        }
        else if(percent.doubleValue() >= 100){
            setValue(pin, getMaxSupportedValue());
        }
        else{
            double value = (getMaxSupportedValue() - getMinSupportedValue()) * (percent.doubleValue()/100f);
            setValue(pin, value);
        }
    }
532639
public function setOrder($mode, $direction = self::DIRECTION_ASC)
    {
        $this->orderMode = $mode;
        $this->orderDirection = $direction;
    }
22801
public static function fromOptionsWithDirection(Direction $direction, OptionsInterface $options = null)
    {
        if (null === $options) {
            $options = (new static($direction))->withExceptionOnSkip(false);
        } else {
            $options = $options->withDirection($direction);
        }
        return $options;
    }
86571
@Override
    public void setValue(Pin pin, Number value) {
        super.setValue(pin, value.doubleValue());
    }
891937
private function pad($padding = 1, $direction = STR_PAD_BOTH): string
    {
        return str_pad($this->number, $padding, 0, $direction);
    }
905843
private function pad(
        int $length,
        string $character = ' ',
        int $direction = self::PAD_RIGHT
    ): self {
        return new self(\str_pad(
            $this->value,
            $length,
            $character,
            $direction
        ), $this->encoding);
    }
1083343
public function sort($direction)
    {
        if (strtolower($direction) === self::DIRECTION_DESC) {
            $this->scanIndexForward = false;
        } else {
            $this->scanIndexForward = true;
        }
    }
583353
public function setDirection($direction)
    {
        if (!in_array($direction, self::$supportedFlipDirection)) {
            throw new \InvalidArgumentException(sprintf(
                    '"%s" Is Not Valid Flip Direction', (string) $direction
            ));
        }
        $this->flipDirection = $direction;

        return $this;
    }
934971
public void setTickmarkDirection(final Direction DIRECTION) {
        this.tickmarkDirection = DIRECTION;
        init(getInnerBounds().width, getInnerBounds().height);
        repaint(getInnerBounds());
    }
1234286
public function move($direction)
    {
        if ($direction === self::DIR_FORWARD) {
            return $this->next();
        } elseif ($direction === self::DIR_BACKWARD) {
            return $this->prev();
        }

        throw new InvalidArgumentException(sprintf('Unknown direction %s', $direction));
    }
1367894
private static void isrCallback(int pin) {
        // dispatch callback to the subscribers for this pin
        List<GpioInterruptCallback> callbacks = isrCallbacks[pin];

        // ensure callbacks collection exists for this pins number
        if(callbacks != null && !callbacks.isEmpty()){
            // iterate over each callback delegate and invoke the callback if the pin and edge type match
            for(GpioInterruptCallback callback : callbacks){
                callback.callback(pin);
            }
        }
    }
515357
private function initDirection()
    {
        if (null !== $this->orderBy) {
            switch ($this->direction) {
                case 'ASC':
                case 'DESC':
                    $this->orderBy = [$this->orderBy => $this->direction];
                    break;

                default:
                    throw new \InvalidArgumentException(sprintf('"direction" option should be set with "orderBy" and should be ASC or DESC'));
                    break;
            }
        }
    }