gpio_get_value

The interface has the following parameters.
  • Synopsis:
    int gpio_get_value(unsigned gpio)
  • Description: The interface is used to get the level from a target GPIO interface. The level is used to define whether the GPIO is an input or an output.
  • Parameter:
    • gpio: The GPIO index number.
  • Return:
    • Success: The level of the target GPIO interface: 0 as low level, 1 as high level.
    • Failure: -1.