linux
fqipkh
这个作者很懒,什么都没留下…
展开
-
全志of_get_named_gpio_flags参数不同
struct gpio_config config; 1043 1044 rst_pin = of_get_named_gpio_flags(np, "reset-gpio", 0, (enum of_gpio_flags *)&config); 1045 if (!gpio_is_valid(rst_pin)) { 1046 printk("can rst_pin: %d is invalid\n", rst_pin); return -ENODEV; ...原创 2022-10-25 09:19:48 · 1659 阅读 · 1 评论 -
linux创建proc节点
staticssize_tes8323_proc_write(structfile*file,constchar__user*buffer, size_tlen,loff_t*data) { char*cookie_pot; char*p; intreg; intvalue; cookie_pot=(char*)vmalloc(len); if(!cookie_pot) ...原创 2020-09-22 21:05:10 · 271 阅读 · 0 评论 -
pthread_cond_broadcast&pthread_cond_signal使用
#include <stdio.h> #include <pthread.h> static pthread_cond_t cond; static pthread_mutex_t mutex1; static pthread_mutex_t mutex2; void *thread1_entry(void *arg) { while(1) { pthread_mutex_lock(&mutex1); .原创 2020-05-16 09:36:56 · 484 阅读 · 0 评论