USB2.0 Spec
USB System Description
A USB system is described by three definitional areas:
• USB interconnect
• USB devices
• USB host
USB interconnect
The USB interconnect is the manner in which USB devices are connected to and communicate with the host.
USB Host
There is only one host in any USB system.
The USB interface to the host computer system is referred to as the Host Controller.
The Host Controller may be implemented in a combination of hardware, firmware, or software.
A root hub is integrated within the host system to provide one or more attachment points.
USB Devices
USB devices are one of the following:
• Hubs, which provide additional attachment points to the USB
• Functions, which provide capabilities to the system, such as an ISDN connection, a digital joystick, or speakers
Function <==> Device
USB devices are divided into device classes such as hub, human interface, printer, imaging, or mass storage
device.
All USB devices are accessed by a USB address that is assigned when the device is attached and
enumerated.
Electrical
The USB transfers signal and power over a four-wire cable,The signaling occurs over
two wires on each point-to-point segment.
Power
The cable also carries VBUS and GND wires on each segment to deliver power to devices. VBUS is
nominally +5 V at the source.
data rates
• The USB high-speed signaling bit rate is 480 Mb/s.
• The USB full-speed signaling bit rate is 12 Mb/s.
• A limited capability low-speed signaling mode is also defined at 1.5 Mb/s.
Clock
The clock is transmitted, encoded along with the differential data. The clock encoding scheme is NRZI
with bit stuffing to ensure adequate transitions. A SYNC field precedes each packet to allow the receiver(s)
to synchronize their bit recovery clocks.
In NRZI encoding, a “1” is represented by no change in level and a “0” is represented by a change in level.
Attachment of USB Devices
All USB devices attach to the USB through ports on specialized USB devices known as hubs. Hubs have
status bits that are used to report the attachment or removal of a USB device on one of its ports. The host
queries the hub to retrieve these bits. In the case of an attachment, the host enables the port and addresses
the USB device through the device’s control pipe at the default address.
The host assigns a unique USB address to the device and then determines if the newly attached USB device
is a hub or a function.
If the attached USB device is a hub and USB devices are attached to its ports, then the above procedure is
followed for each of the attached USB devices.
If the attached USB device is a function, then attachment notifications will be handled by host software that
is appropriate for the function.
Removal of USB Devices
When a USB device has been removed from one of a hub’s ports, the hub disables the port and provides an
indication of device removal to the host. The removal indication is then handled by appropriate USB
System Software. If the removed USB device is a hub, the USB System Software must handle the removal
of both the hub and of all of the USB devices that were previously attached to the system through the hub.
Bus Enumeration
Bus enumeration is the activity that identifies and assigns unique addresses to devices attached to a bus.
Because the USB allows USB devices to attach to or detach from the USB at any time, bus enumeration is
an on-going activity for the USB System Software.
Data Flow Types
- Control Transfers
- Control data is used by the USB System Software to configure devices when they are first attached
- Bulk Data Transfer
- Bulk data typically consists of larger amounts of data, such as that used for printers or scanners.
- Bulk data is sequential.
- Interrupt Data Transfers
- Isochronous Data Transfers
A pipe supports only one of the types of transfers described above for any given device configuration.
Physical Bus Topology
A composite device has only a single device address.
A device that has multiple interfaces controlled independently of each other is referred to as a composite device.
Logical Bus Topology
While devices physically attach to the USB in a tiered, star topology, the host communicates with each
logical device as if it were directly connected to the root port.
USB Communication Flow
Client Software-to-function Relationship
EndPoints
An endpoint is a uniquely identifiable portion of a USB device that is the terminus of a communication flow
between the host and device.
Each endpoint on a device is given at design time a unique device-determined identifier called the endpoint
number.
The combination of the device address, endpoint number, and direction allows each endpoint to be uniquely referenced.
Pipes
A USB pipe is an association between an endpoint on a device and software on the host.
Pipes represent the ability to move data between software on the host via a memory buffer and an endpoint on a device.
There are two mutually exclusive pipe communication modes:
• Stream: Data moving through a pipe has no USB-defined structure
• Message: Data moving through a pipe has some USB-defined structure
Transfer Management
Mechanical
Icon
USB Connector Termination Data
Frame
USB Device States
- Attached
- Powered
- USB devices may obtain power from an external source and/or from the USB through the hub to which they
are attached.
- USB devices may obtain power from an external source and/or from the USB through the hub to which they
- Default
- After the device has been powered, it must not respond to any bus transactions until it has received a reset
from the bus.After receiving a reset, the device is then addressable at the default address.
- After the device has been powered, it must not respond to any bus transactions until it has received a reset
- Address
- All USB devices use the default address when initially powered or after the device has been reset.
- Each USB device is assigned a unique address by the host after attachment or after reset.
- A USB device responds to requests on its default pipe whether the device is currently assigned a unique
address or is using the default address.
- Configured
- Before a USB device’s function may be used, the device must be configured.
- Suspended
- In order to conserve power, USB devices automatically enter the Suspended state when the device has
observed no bus traffic for a specified period.
- In order to conserve power, USB devices automatically enter the Suspended state when the device has
USB Host
The USB System has three basic components:
• Host Controller Driver
• USB Driver
• Host Software
The Host Controller Driver (HCD) exists to more easily map the various Host Controller implementations
into the USB System, such that a client can interact with its device without knowing to which Host
Controller the device is connected.
The USB Driver (USBD) provides the basic host interface (USBDI) for clients to USB devices.
The client layer describes all the software entities that are responsible for directly interacting with USB
devices.
Device Configuration
When a device is attached, the hub driver receives a notification from the hub detecting the change.
The hub driver, using the information provided by the hub, requests a device identifier from the USBD.
The device is now ready to be configured for use. For each device, there are three configurations that must
be complete before that device is ready for use:
- Device Configuration: This includes setting up all of the device’s USB parameters and allocating all
USB host resources that are visible to the device. This is accomplished by setting the configuration
value on the device. A limited set of configuration changes, such as alternate settings, is allowed
without totally reconfiguring the device. Once the device is configured, it is, from its point of view,
ready for use. - USB Configuration: In order to actually create a USBD pipe ready for use by a client, additional USB
information, not visible to the device, must be specified by the client. This information, known as the
Policy for the pipe, describes how the client will use the pipe. This includes such items as the
maximum amount of data the client will transfer with one IRP, the maximum service interval the client
will use, the client’s notification identification, and so on. - Function Configuration: Once configuration types 1 and 2 have been accomplished, the pipe is
completely ready for use from the USB’s point of view. However, additional vendor- or class-specific
setup may be required before the client can actually use the pipe. This configuration is a private matter
between the device and the client and is not standardized by the USBD.
相关文章:
USB2.0 Spec
USB System Description A USB system is described by three definitional areas: • USB interconnect • USB devices • USB host USB interconnect The USB interconnect is the manner in which USB devices are connected to and communicate with the host. USB Ho…...
prbs测试
PRBS是 Pseudo Random Binary Sequence 的简称,是一种伪随机序列,用于产生随机数据。 PRBS检测主要应用在设备开局或维护期间,在没有合适误码仪的情况下,使能了PRBS检测功能的设备自行发送PRBS码流,PRBS码流通过被测试网络,经远端设备环回(远端设备需要配置环回),经过PR…...
计算机网络:数据链路层(VLAN)
今天又学到一个知识,加油! 目录 一、传统局域网的局限(促进VLAN的诞生) 二、VLAN简介 三、VLAN的实现 总结 一、传统局域网的局限(促进VLAN的诞生) 缺乏流量隔离:即使把组流量局域化道一个单一交换机中…...
C# WPF上位机开发(动态添加控件)
【 声明:版权所有,欢迎转载,请勿用于商业用途。 联系信箱:feixiaoxing 163.com】 写图形界面软件的时候,我们经常会遇到一种情况。那就是图形界面上面,显示的控件可能是不定的。有可能多,也有可…...
MySQL进阶|MySQL中的事务(一)
文章目录 数据库事务MySQL中的存储引擎InnoDB存储引擎架构什么是事务事务的状态总结 数据库事务 MySQL 事务主要用于处理操作量大,复杂度高的数据。比方我想要删除一个用户(销户)以及这个用户的个人信息、订单信息以及其他信息,这…...
设计模式策略模式讲解和代码示例
引言 策略是一种行为设计模式, 它将一组行为转换为对象, 并使其在原始上下文对象内部能够相互替换。 原始对象被称为上下文, 它包含指向策略对象的引用并将执行行为的任务分派给策略对象。 为了改变上下文完成其工作的方式, 其他对象可以使用另一个对象来替换当前链接的策…...
Qt容器QStackedWidget小部件堆栈
# QStackedWidget QStackedWidget是Qt框架中的一个控件,用于在同一区域显示多个子控件,只有一个子控件可见。以下是一些常用的QStackedWidget函数: addWidget(QWidget *widget):向QStackedWidget中添加一个子控件。 insertWidget(int index, QWidget *widget):在指定位置…...
设计模式 简单工厂 工厂方法模式 抽象工厂模式 Spring 工厂 BeanFactory 解析
工厂模式介绍 工厂模式是我们最常用的实例化对象模式了,是用工厂方法代替new操作的一种模式。它是创建型模式。 简单工厂 简单工厂模式是指由一个工厂对象决定创建出哪一种产品类的实例, 但它不属于GOF 23种设计模式 简单工厂适用于工厂类负责创建的对象较少的场景,…...
【Hive_03】单行函数、聚合函数、窗口函数、自定义函数、炸裂函数
1、函数简介2、单行函数2.1 算术运算函数2.2 数值函数2.3 字符串函数(1)substring 截取字符串(2)replace 替换(3)regexp_replace 正则替换(4)regexp 正则匹配(5ÿ…...
RabbitMQ手动应答与持久化
1.SleepUtil线程睡眠工具类 package com.hong.utils;/*** Description: 线程睡眠工具类* Author: hong* Date: 2023-12-16 23:10* Version: 1.0**/ public class SleepUtil {public static void sleep(int second) {try {Thread.sleep(1000*second);} catch (InterruptedExcep…...
java使用枚举类型解决if-else大量堆积
调用代码 import com.example.javaone.kk.MyEnum;public class Gst {public static void main(String[] args) {MyEnum eMyEnum.getById(1);System.out.println(e.getGetSize());} }被调用代码 package com.example.javaone.kk; public enum MyEnum {ENUM1(1,2),ENUM2(2,3),E…...
【数据结构】八大排序之直接插入排序算法
🦄个人主页:修修修也 🎏所属专栏:数据结构 ⚙️操作环境:Visual Studio 2022 一.直接插入排序简介及思路 直接插入排序(Straight Insertion Sort)是一种简单直观的插入排序算法. 它的基本操作是: 将一个数据插入到已经排好的有序表中,从而得到一个新的,数…...
网络编程『socket套接字 ‖ 简易UDP网络程序』
🔭个人主页: 北 海 🛜所属专栏: Linux学习之旅、神奇的网络世界 💻操作环境: CentOS 7.6 阿里云远程服务器 文章目录 🌤️前言🌦️正文1.预备知识1.1.IP地址1.2.端口号1.3.端口号与进…...
FreeSWITCH rtp endpoint recvonly
查了下rtp.c的源码,远端端口为0就意味着recvonly,但其实不然,调用switch_rtp_new会马上返回失败 经过反复测试,增加下面几行代码之后终于变成了recvonly: tech_pvt->mode RTP_RECVONLY; rtp_flags[SWITCH_RTP_FLAG_AUTOADJ];…...
Hadoop和Spark的区别
Hadoop 表达能力有限。磁盘IO开销大,延迟度高。任务和任务之间的衔接涉及IO开销。前一个任务完成之前其他任务无法完成,难以胜任复杂、多阶段的计算任务。 Spark Spark模型是对Mapreduce模型的改进,可以说没有HDFS、Mapreduce就没有Spark。…...
英文论文降重修改技巧 papergpt
大家好,今天来聊聊英文论文降重修改技巧,希望能给大家提供一点参考。 以下是针对论文重复率高的情况,提供一些修改建议和技巧,可以借助此类工具: 英文论文降重修改技巧 作为网站编辑,我们经常需要处理大量…...
DevOps搭建(十)-安装Harbor镜像仓库详细步骤
1、下载Harbor 官方地址: https://goharbor.io/ 下载地址: https://github.com/goharbor/harbor/tags 选择文档版本进行下载,这里我们选择v2.7.2版本 2、上传到服务器并解压 上传压缩包到服务器后,解压到/usr/local目录下&a…...
DDA 算法
CAD 算法是计算机辅助设计的算法,几何算法是解决几何问题的算法 CAD 算法是指在计算机辅助设计软件中使用的算法,用于实现各种设计和绘图功能,CAD 广泛应用于建筑、机械、电子等领域,可以大大提高设计效率和精度 绘图算法是 CAD…...
天猫数据平台-淘宝天猫数据-天猫销售数据分析:11月天猫平台滑雪运动装备行业销量翻倍!
随着天气变冷、冬季来临,迎来了疫情后的首个滑雪季,加之自冬奥会结束以来,大众参与冰雪运动的热度持续攀升,因此,冰雪运动的需求正集中释放。 根据相关数据显示,11月以来,全国滑雪场门票预订量较…...
使用OpenCV和PIL库读取图片的区别
OpenCV 和 PIL(Pillow)是两个不同的图像处理库,它们使用不同的数据结构来表示图像。 OpenCV 格式图像: OpenCV 中的图像通常表示为 NumPy 数组。这些数组可以是多维的,例如对于彩色图像,它们是三维数组&am…...
Amazon CodeWhisperer:AI 编程助手
文章作者:prigioni 1. 什么是 Amazon CodeWhisperer? Amazon CodeWhisperer 能够理解以自然语言(英语)编写的注释,并能实时生成多条代码建议,以此提高开发人员生产力。该服务可以直接在集成开发环境&#…...
Linux 使用 Anaconda+Uwsgi 部署 Django项目和前端项目
一、安装Anaconda 使用Anaconda创建python环境的优点: virtualenv只能创建系统原有的python版本,而不能创建创建任意版本的环境 而Anaconda的虚拟环境中,你可以指定任意现存可使用的python环境(包括比原环境版本高的python版本&a…...
分析若依的文件上传处理逻辑
分析若依的文件上传处理逻辑 注:已经从若依框架完成拆分,此处单独分析一下人家精彩的封装,也来理解一下怎么做一个通用的上传接口!如有分析的,理解的不透彻的地方,大家多多包含,欢迎批评指正&am…...
Note3---初阶二叉树~~
目录 前言🍄 1.树概念及结构☎️ 1.1 树的概念🎄 1.2 树的相关概念🦜 1.2.1 部分概念的加深理解🐾 1.2.2 树与非树🪴 1.3 树的表示🎋 1.4 树在实际中的运用(表示文件系统…...
ElasticSearch学习篇8_Lucene之数据存储(Stored Field、DocValue、BKD Tree)
前言 Lucene全文检索主要分为索引、搜索两个过程,对于索引过程就是将文档磁盘存储然后按照指定格式构建索引文件,其中涉及数据存储一些压缩、数据结构设计还是很巧妙的,下面主要记录学习过程中的StoredField、DocValue以及磁盘BKD Tree的一些…...
ROS机器人入门
http://www.autolabor.com.cn/book/ROSTutorials/ 1、ROS简介 ROS 是一个适用于机器人的开源的元操作系统。其实它并不是一个真正的操作系统,其 底层的任务调度、编译、寻址等任务还是由 Linux 操作系统完成,也就是说 ROS 实际上是运 行在 Linux 上的次级…...
30. 深度学习进阶 - 池化
Hi,你好。我是茶桁。 上一节课,我们详细的学习了卷积的原理,在这个过程中给大家讲了一个比较重要的概念,叫做input channel,和output channel。 当然现在不需要直接去实现, 卷积的原理PyTorch、或者TensorFlow什么的…...
工业应用新典范,飞凌嵌入式FET-D9360-C核心板发布!
来源:飞凌嵌入式官网 当前新一轮科技革命和产业变革突飞猛进,工业领域对高性能、高可靠性、高稳定性的计算需求也在日益增长。为了更好地满足这一需求,飞凌嵌入式与芯驰科技(SemiDrive)强强联合,基于芯驰D9…...
Webrtc 学习交流
花了几周的时间研究了一下webrtc ,并开发了一个小项目,用来点对点私密聊天 交流传输文件等…后续会继续扩展其功能。 体验地址,大狗子的ID,我在线时可以连接测试到我 f3e0d6d0-cfd7-44a4-b333-e82c821cd927 项目特点 除了交换信令与stun 没…...
华为云之轻松搭建 Nginx 静态网站
华为云之轻松搭建 Nginx 静态网站 一、本次实践介绍1. 本次实践目的2. 本次实践环境 二、ECS弹性云服务器介绍三、准备实践环境1. 预置环境2. 查看ECS服务器的账号密码信息3. 登录华为云4. 远程登录ECS服务器 四、安装配置 Nginx1. 安装nginx2. 启动nginx3. 浏览器中访问nginx服…...
辽阳建设网站公司报价/网站排名优化价格
我说过了,shell是我的常规武器,目前虽然还不纯熟,但是我爱shell这门语言,在Linux下面混,总要写脚本。程序员是有基因,对编程语言是有偏好的,你让我写C代码,我会觉得很爽,…...
做百度竞价什么网站好/企业官方网站推广
问题 C: 查找 题目描述 输入数组长度 n 输入数组 a[1...n] 输入查找个数m 输入查找数字b[1...m] 输出 YES or NO 查找有则YES 否则NO 。 输入 输入有多组数据。 每组输入n,然后输入n个整数,再输入m,然后再输入m个整数࿰…...
自己做的腾讯充值网站/谷歌搜索引擎seo
安装mysql模块 npm install mysql 数据库准备 mysql server所在的机器IP地址是192.168.0.108,登录账户就用root123456 在mysql中创建test数据库 在test数据库中创建一张users表 操作 连接数据库 var mysqlrequire(mysql);var connection mysql.createConnection({h…...
做网站需要备案/七台河网站seo
众所周知,c程序的运行时,内存分为以下几个段: 代码段(Text segment )数据段(Initialized data segment)BSS段(Uninitialized data segment)栈(stackÿ…...
wordpress好用的文章编辑器/网站里的友情链接
itext2.0.8 将 HTML 转换成 PDF, 完美 CSS, 带图片, 自动分页之前用 itext7 将 html 导出为 PDF, 比较方便, 代码较少, 而且支持 base64 的图片. 但是 itext7 是收费的, 所以换成了 xhtmlrenderer.xhtmlrenderer 自带 itext2.0.8, 而且不能再引入其他版本的 itext, 因为 itext2…...
wordpress去除顶部工具栏/商城小程序
JavaScript事件绑定的方法说明 本文为转载 原作者不明 罪过罪过事件使得客户端的 JavaScript 有机会被激活,并得以运行。在一个 Web 页面装载之后,运行脚本的唯一方式,就是响应系统或者用户的动作。虽然从第一个支持脚本编程的浏览器面世以来…...