主题:[求助]ESM8400设置GPIO不生效,如何解决? 共有238人关注过本帖 |
---|
![]() zhangsan |
1楼 信息 | 搜索 | 邮箱 |
![]() ![]() ![]() ![]() |
[求助]ESM8400设置GPIO不生效,如何解决? ![]() GPIO4没有被占用,代码: int gpio_fd = 0; uint32_t state = 0xffffffff; gpio_fd = gpio_open(); gpio_outdisable(gpio_fd, 0xffffffff); state = 0xffffffff; gpio_pinstate(gpio_fd, &state); printf("%x\n", state); //ff1c3def gpio_outenable(gpio_fd, 4); gpio_outset(gpio_fd, 4);
gpio_outdisable(gpio_fd, 0xffffffff); state = 0xffffffff; gpio_pinstate(gpio_fd, &state); printf("%x\n", state); //ff1c3def |
单帖管理 | 引用 | 回复 ![]() |
![]() zhangsan |
2楼 信息 | 搜索 | 邮箱 |
![]() ![]() ![]() ![]() |
![]() 如果需要设置GPIO4为高电平需要怎么设置呢?只是先调用gpio_outenable函数再调用gpio_outset函数好像不能拉高GPIO4 |
单帖管理 | 引用 | 回复 ![]() |