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
There are 72 gpio pins in K230:
0 ~ 31 -> gpio0 32 ~ 63 -> gpio1 64 ~ 71 -> gpio2
But only gpio0 and gpio1 has complete register group.
In drv_gpio.c, port B registers of gpio1 was used to control direction/input/output.
like
int kd_pin_read(rt_base_t pin) { int ret = check_pin_valid(pin); if(ret == -1) { LOG_E("pin %d not valid for read", pin); return -RT_ERROR; } if(pin < 32) return kd_gpio_reg_readl(kd_gpio[0] + DATA_INPUT, pin) == GPIO_PV_HIGH ? PIN_HIGH : PIN_LOW; else { pin -= 32; if(pin < 32) return kd_gpio_reg_readl(kd_gpio[1] + DATA_INPUT, pin) == GPIO_PV_HIGH ? PIN_HIGH : PIN_LOW; else { pin -= 32; return kd_gpio_reg_readl(kd_gpio[1] + DATA_INPUT + DATA_INPUT_STRIDE, pin) == GPIO_PV_HIGH ? PIN_HIGH : PIN_LOW; ^^^^^^^^^^^^^^^^^ } } }
So, in gpio1, port A controls itself and port B controls gpio2? And how about port B of gpio0?
The text was updated successfully, but these errors were encountered:
wuwentao
zhangxiaojingCAN
No branches or pull requests
Help
There are 72 gpio pins in K230:
But only gpio0 and gpio1 has complete register group.
In drv_gpio.c, port B registers of gpio1 was used to control direction/input/output.
like
So, in gpio1, port A controls itself and port B controls gpio2? And how about port B of gpio0?
The text was updated successfully, but these errors were encountered: