Zhou, who imx287 gpio_get_value function return value

gpio_get_value(MXS_PIN_TO_GPIO(p_gpio->pin));

The return value of the function return is not granted a high level, a low level returns 0,

High return is not a return value register is a register gpio
such as:

When p2.7 pin level is high, the output value is 0x80: (2 1000 0000 binary) of 7bit is high
when p3.26 pin is high, the output value is 0x4000000 (2 hex: 01000000 0000 0000 0000 0000 0000) is the first 26bit high

 Therefore, upon receipt of the function return value is determined according to the pin about the pin, or directly determines the non-0 value is considered to be high on the line

Guess you like

Origin www.cnblogs.com/emlsyx/p/12312876.html