USB驱动中的几个关键数据结构
来源:互联网 发布:淘宝刚开店卖什么 编辑:程序博客网 时间:2024/04/28 16:19
usb_driver:描述USB驱动程序的数据结构 ----驱动
struct usb_driver {
struct module *owner;
const char *name;
int (*probe) (struct usb_interface *intf, const struct usb_device_id *id);
void (*disconnect) (struct usb_interface *intf);
int (*ioctl) (struct usb_interface *intf, unsigned int code, void *buf);
int (*suspend) (struct usb_interface *intf, pm_message_t message);
int (*resume) (struct usb_interface *intf);
const struct usb_device_id *id_table;
struct device_driver driver;//(这个是基本的数据结构,具体驱动的数据结构以其为核心进行了包装)
};
struct usb_device:描述USB设备的数据结构 ----设备
struct usb_device {
int devnum; /* Address on USB bus */
char devpath [16]; /* Use in messages: /port/port/... */
enum usb_device_state state; /* configured, not attached, etc */
enum usb_device_speed speed; /* high/full/low (or error) */
struct usb_tt *tt; /* low/full speed dev, highspeed hub */
int ttport; /* device port on that tt hub */
struct semaphore serialize;
unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */
struct usb_device *parent; /* our hub, unless we're the root */
struct usb_bus *bus; /* Bus we're part of */
struct usb_host_endpoint ep0;
struct device dev; /* Generic device interface */
struct usb_device_descriptor descriptor;/* Descriptor */
struct usb_host_config *config; /* All of the configs */
struct usb_host_config *actconfig;/* the active configuration */
struct usb_host_endpoint *ep_in[16];
struct usb_host_endpoint *ep_out[16];
char **rawdescriptors; /* Raw descriptors for each config */
int have_langid; /* whether string_langid is valid yet */
int string_langid; /* language ID for strings */
char *product;
char *manufacturer;
char *serial; /* static strings from the device */
struct list_head filelist;
struct class_device *class_dev;
struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */
/*
* Child devices - these can be either new devices
* (if this is a hub device), or different instances
* of this same device.
*
* Each instance needs its own set of data structures.
*/
int maxchild; /* Number of ports if hub */
struct usb_device *children[USB_MAXCHILDREN];
};
- USB驱动中的几个关键数据结构
- Linux设备驱动 中的几个关键数据结构
- Linux USB 驱动开发(二)—— USB 驱动几个重要数据结构
- Linux USB 驱动开发(二)—— USB 驱动几个重要数据结构
- Linux USB 驱动开发(二)—— USB 驱动几个重要数据结构
- SPI-------------LINUX----------驱动中的几个关键结构体
- Linux USB驱动数据结构
- LINUX驱动几个关键点
- 设备驱动中关键数据结构
- OpenIPMP中的几个关键概念
- NameNode中几个关键的数据结构
- NameNode中几个关键的数据结构
- LINUX USB驱动开发(1)-USB驱动重要数据结构
- 数据结构中的几个算法
- socket中的几个数据结构
- 我理解的USB接口通信的几个关键点
- USB HID协议中几个关键概念的理解
- USB HID协议中几个关键概念的理解
- 第一篇文章(收藏)
- 我弟弟今天结婚了
- Delphi快速入门(二)
- 生命是一场孤独的跋涉
- 字符次序问题
- USB驱动中的几个关键数据结构
- 留青雕
- C#汉字拼音的一些运用
- NAND flash文件系统
- 关于ibatis insert 返回值为 null的研究----得到插入数据的逐渐值
- WebBrowser
- web service中的命名空间
- 近来准备研究一下arm的字节对齐问题
- oracle数据文件查看工具-oracle恢复工具之一