默默的一块石头
发布时间:2019-11-01 17:31:41
int main(int argc, char *argv[]) { _cleanup_free_ char *cgroup = NULL; int fd_ctrl = -1, fd_uevent = -1; int r; r = parse_argv(.........【阅读全文】
发布时间:2019-11-01 17:30:22
int bus_match(struct device *dev, struct device_driver *drv);int bus_match(struct device *dev, struct device_driver *drv){ const struct of_device_id * pof_match_table = drv->of_match_table; struct device * pdev; for (pof_match_table; pof_match_table->name[0]; po.........【阅读全文】
发布时间:2019-10-22 20:32:26
struct device deviceSY = { .init_name = "deviceSY", };static struct class *char_dev_class; char_dev_class = class_create(THIS_MODULE,"deviceSY_class");//creat "deviceSY_class" file in /sys/class/deviceSY_class if (IS_ERR(char_dev_class.........【阅读全文】
发布时间:2019-10-16 19:25:24
#include linux/module.h#include linux/init.h#include linux/kobject.h#include linux/kernel.hstatic struct kobject *devicesSY_kobj;static struct kobject *kobj;static ssize_t devicesSY_attr_show(struct kobject *kobj, struct attribute *attr,char *buf){ struct textattribute * test;.........【阅读全文】