We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bsp/cvitek/cv18xx_risc-v/
在编写跑马灯例子过程中,尝试读取 GPIO 引脚的状态值,失败
简单示例代码如下:
static int led_on(void) { rt_pin_write(pinno, PIN_HIGH); rt_kprintf("%d\n", rt_pin_read(pinno)); // 这里希望读到 1,但是 0 return 0; } static int led_off(void) { rt_pin_write(pinno, PIN_LOW); rt_kprintf("%d\n", rt_pin_read(pinno)); // 这里希望读到 0, return 0; }
看了一下驱动,rt_pin_read 回去读取 GPIO_EXT_PORTA,怀疑这个寄存器是不是反应了引脚的状态?
The text was updated successfully, but these errors were encountered:
已经 report 给 sophgo 看看这个寄存器到底怎么个说法
Sorry, something went wrong.
是否可能和pin的模式相关?难道需要先配置成输入模式?
No branches or pull requests
bsp/cvitek/cv18xx_risc-v/
最新 master在编写跑马灯例子过程中,尝试读取 GPIO 引脚的状态值,失败
简单示例代码如下:
看了一下驱动,rt_pin_read 回去读取 GPIO_EXT_PORTA,怀疑这个寄存器是不是反应了引脚的状态?
The text was updated successfully, but these errors were encountered: