Drivers using GPIO

First set it to GPIO mode (not other multiplexing mode) in Infinity2M-SSC011A-S01A-PADMUX-XXX. DTSI:


Application GPIO:
int gpio_request(unsigned gpio,constchar* label);

Set GPIO as input mode:
int gpio_direction_input(unsigned gpio);

Set GPIO to output mode:
int gpio_direction_output(unsigned gpio,int value);

Get the input level of this GPIO:
int gpio_get_value(unsigned gpio);

Set the output level of this GPIO:
void gpio_set_value(unsigned gpio,int value);

文档更新时间: 2021-03-17 17:16   作者:Aeeditor