GPIO.name constructor

GPIO.name(
  1. String name,
  2. GPIOdirection direction, [
  3. int chip = 0
])

Opens the character device GPIO with the specified GPIO name and direction at the default character device GPIO with the chip number. The default chip number is 0, with the path /dev/gpiochip0. Use GPIO.setBaseGPIOpath to change the default character device path.

Implementation

GPIO.name(this.name, this.direction, [this.chip = 0])
    : path = _gpioBasePath + chip.toString(),
      line = -1,
      _gpioHandle =
          _openNameGPIO(_gpioBasePath + chip.toString(), name, direction);