#include <linux/gpio.h>
static int xxx_probe(struct platform_device *ofdev)
{
int ret;
//Zynq MIO15
ret = gpio_request(15, "gpio15");
if(ret < 0)
return -1;
ret = gpio_direction_output(15, 0);
if(ret < 0)
return -2;
mdelay(20);
gpio_set_value(15, 1);
gpio_free(15);
}
Linux内核操作GPIO
最新推荐文章于 2023-07-26 20:42:31 发布