from_timer
时间: 2023-08-06 20:09:24 浏览: 342
timer
from_timer是一个宏定义,用于计算出设备结构体的地址,从而实现向回调函数传递参数的目的。在给定的例子中,from_timer被用于计算出struct imx6ulkey_dev结构体的地址,并将其赋值给dev变量。这样,在timer_function回调函数中,就可以通过dev变量来访问设备结构体的成员。\[1\]
#### 引用[.reference_title]
- *1* *3* [【Linux 驱动学习】内核定时器的用法,及linux升级导致的改变](https://blog.csdn.net/HoshinoGenLIAO/article/details/124822058)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [form timer的使用](https://blog.csdn.net/clg10036/article/details/100223306)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文