zoukankan      html  css  js  c++  java
  • 设备驱动小札sysfs

    1) kobject_add-----sysfs's dir

    2) 位置与kobject->parent有关

    3) attribute-------sysfs's file

    4) kobject_type-----attribute 

             |--------attribute's operation= sysfs_ops---  show

                                                                                    |-- store

    5) nondefault attribute  增加自己需要的属性   

                        |----------int sysfs_create_file(struct kobject *kobj, struct attribute *attr);

                        |----------int sysfs_remove_file(struct kobject *kobj, struct attribute *attr);

    6) binary attribute 用户空间和设备传输数据

           |----------int sysfs_create_bin_file(struct kobject *kobj, struct bin_attribute *attr); 

           |----------int sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); 

    7) symbolic link  建立不同目录间的联系

           |----------int sysfs_create_link(struct kobject *kobj, struct kobject *target, char *name); 

                        |----------void sysfs_remove_link(struct kobject *kobj, char *name); 

  • 相关阅读:
    double相加(減)结果会有些误差
    创建表,操作表
    删除数据库
    DDL语句
    HCDA-12-配置基本静态路由
    HCDA-11-配置直连路由
    1-5配置STelnet登录系统
    HCDA-9-管理设备文件系统
    HCDA-8-了解设备系统文件
    Java生成随机汉字
  • 原文地址:https://www.cnblogs.com/westwind/p/1930328.html
Copyright © 2011-2022 走看看