gpio_set_ven(
时间: 2023-12-21 08:06:39 浏览: 72
gpio_return_gpio_set_value_GPIO_gpio_set_
5星 · 资源好评率100%
gpio_set_ven()函数用于设置指定GPIO引脚的值。根据引用中的代码,可以看出该函数接受两个参数:gpio_no表示GPIO引脚号,state表示要设置的值。在函数内部,通过将state转换为unsigned long类型,并将其左移31位,再与gpio_no进行按位或运算,从而得到一个用于ioctl函数的val值。然后调用ioctl函数将val传递给fd文件描述符,在底层进行GPIO的操作。因此,gpio_set_ven()函数可以用于设置指定GPIO引脚的值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Dts 里gpio的那些事儿](https://blog.csdn.net/junwua/article/details/82414014)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [gpio_return_gpio_set_value_GPIO_gpio_set_](https://download.csdn.net/download/weixin_42681774/27983469)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文