Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pmrust/pmrust.pages.upb.ro
  • genan.omer/pmrust.pages.upb.ro
  • vladut.chintoiu/pmrust.pages.upb.ro
  • petru.nania/website-pmrust-fork
  • sofia.huzan/pmrust.pages.upb.ro
  • ionut.pruteanu2308/arcade-game
  • luana.militaru/pong-game
  • sebastian.scrob/project
  • matei.bejinaru/website-bejinaru-matei
  • adragomir2806/website-dragomir-alexandru
  • fatemehsadat/pmrust.pages.upb.ro
  • razvan.costea2205/pmrust.pages.upb.ro
  • darius_gabriel.iuga/pm-website
  • andrei.neagu1910/pmrust.pages.upb.ro
  • irina.chiorean/pmrust.pages.upb.ro
  • adrian_costin.lungu/pmrust.pages.upb.ro
  • andrei.salavastru/pmrust.pages.upb.ro
  • maria_elena.tudor/pmrust.pages.upb.ro
  • vlad.preda2503/electric-piano
  • delia_alexa.dragan/website-music-player
  • francisc.niss/automatic-guitar-tuner
  • mihnea.sandulache/pmrust.pages.upb.ro
  • dragos_andrei.rosu/pmrust.pages.upb.ro
  • armin.shafiei/the-tone-corrector
  • vladyslav.kiselar/pmrust.pages.upb.ro
  • carla_maria.rusu/pmrust.pages.upb.ro
26 results
Show changes
Showing
with 7 additions and 1432 deletions
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="401px" height="112px" viewBox="-0.5 -0.5 401 112"><defs/><g><g><rect x="0" y="0" width="300" height="110" rx="16.5" ry="16.5" fill="#b1ddf0" stroke="#10739e" pointer-events="all"/></g><g><rect x="120" y="7.5" width="100" height="92.5" rx="13.88" ry="13.88" fill="#ffe6cc" stroke="#d79b00" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 54px; margin-left: 121px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>MCU</div><div><br /></div><div><br /></div><div><br /></div><div><br /></div></div></div></div></foreignObject><text x="170" y="57" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">MCU...</text></switch></g></g><g><path d="M 300.1 53.76 L 340 53.82 L 379.9 53.96" fill="none" stroke="#73a3a4" stroke-width="3" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 293.35 53.75 L 302.36 49.27 L 300.1 53.76 L 302.35 58.27 Z" fill="#73a3a4" stroke="#73a3a4" stroke-width="3" stroke-miterlimit="10" pointer-events="all"/><path d="M 386.65 53.99 L 377.63 58.46 L 379.9 53.96 L 377.66 49.46 Z" fill="#73a3a4" stroke="#73a3a4" stroke-width="3" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 40px; margin-left: 340px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;"> I/O Bus </div></div></div></foreignObject><text x="340" y="43" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle"> I/O Bus </text></switch></g></g><g><rect x="230" y="7.5" width="60" height="92.5" rx="9" ry="9" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 54px; margin-left: 231px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>Digital<br /></div><div>Interface</div><div><br /></div><div><br /></div><div><br /></div></div></div></div></foreignObject><text x="260" y="57" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Digital...</text></switch></g></g><g><path d="M 180 55 L 185.03 55.03 L 185.01 63.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 185 68.88 L 181.52 61.87 L 185.01 63.63 L 188.52 61.89 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><path d="M 130 25 L 180 55 L 130 85 Z" fill="#b0e3e6" stroke="#0e8088" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 48px; height: 1px; padding-top: 55px; margin-left: 131px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">ADC </div></div></div></foreignObject><text x="155" y="59" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">ADC </text></switch></g></g><g><path d="M 110 55 L 123.63 55" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 128.88 55 L 121.88 58.5 L 123.63 55 L 121.88 51.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><path d="M 210 80 L 215.03 80 L 215.03 53.82 L 223.63 53.78" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 228.88 53.76 L 221.9 57.29 L 223.63 53.78 L 221.87 50.29 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><rect x="160" y="70" width="50" height="20" rx="3" ry="3" fill="#b0e3e6" stroke="#0e8088" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 48px; height: 1px; padding-top: 80px; margin-left: 161px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Cleanup</div></div></div></foreignObject><text x="185" y="84" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Cleanup</text></switch></g></g><g><rect x="235" y="50" width="50" height="20" rx="3" ry="3" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 48px; height: 1px; padding-top: 60px; margin-left: 236px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Reg1</div></div></div></foreignObject><text x="260" y="64" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Reg1</text></switch></g></g><g><rect x="235" y="74" width="50" height="20" rx="3" ry="3" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 48px; height: 1px; padding-top: 84px; margin-left: 236px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">RegN</div></div></div></foreignObject><text x="260" y="88" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">RegN</text></switch></g></g><g/><g><rect x="10" y="7.5" width="100" height="95" rx="14.25" ry="14.25" fill="#f5f5f5" stroke="#666666" pointer-events="all"/></g><g><image x="14.5" y="9.5" width="90" height="90" xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgaGVpZ2h0PSI4MDBweCIgd2lkdGg9IjgwMHB4Ij4mI3hhOzxwYXRoIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2U9IiMwMDAwMDAiIGQ9Ik04LjQ2NDQ3IDE1LjUzNTVDNi41MTE4NSAxMy41ODI5IDYuNTExODUgMTAuNDE3MSA4LjQ2NDQ3IDguNDY0NDdNNS42MzU5MiAxOC4zNjRDMi4xMjEyIDE0Ljg0OTMgMi4xMjEyIDkuMTUwNzcgNS42MzU5MiA1LjYzNjA1TTE1LjUzNTUgMTUuNTM1NUMxNy40ODgxIDEzLjU4MjkgMTcuNDg4MSAxMC40MTcxIDE1LjUzNTUgOC40NjQ0N00xOC4zNjQgMTguMzY0QzIxLjg3ODggMTQuODQ5MyAyMS44Nzg4IDkuMTUwNzcgMTguMzY0IDUuNjM2MDVNMTMgMTIuMDAwMUMxMyAxMi41NTIzIDEyLjU1MjMgMTMuMDAwMSAxMiAxMy4wMDAxQzExLjQ0NzcgMTMuMDAwMSAxMSAxMi41NTIzIDExIDEyLjAwMDFDMTEgMTEuNDQ3OCAxMS40NDc3IDExLjAwMDEgMTIgMTEuMDAwMUMxMi41NTIzIDExLjAwMDEgMTMgMTEuNDQ3OCAxMyAxMi4wMDAxWiIvPiYjeGE7PC9zdmc+" preserveAspectRatio="none"/></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
\ No newline at end of file
---
layout: section
---
# Sensors
Analog and Digital Sensors
---
---
# Bibliography
for this section
**BOSCH**, *[BMP280 Digital Pressure Sensor](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf)*
- Chapter 3 - *Functional Description*
- Chapter 4 - *Global memory map and register description*
- Chapter 5 - *Digital Interfaces*
- Subchapter 5.2 - *I2C Interface*
---
---
# Sensors
analog and digital
<div grid="~ cols-2 gap-5">
<div>
### Analog
- only the transducer (the analog sensor)
- outputs (usually) voltage
- requires:
- an ADC to be read
- cleaning up the noise
<br>
<img src="/sensors/analog_sensor.svg" class="rounded">
</div>
<div>
### Digital
- consists of:
- a transducer (the analog sensor)
- an ADC
- an MCU for cleaning up the noise
- outputs data using a digital bus
<br>
<img src="/sensors/digital_sensor.svg" class="rounded">
</div>
</div>
---
---
# BMP280 Digital Pressure Sensor
schematics
<div align="center">
<img src="/sensors/bmp280_schematics.png" class="rounded w-150">
</div>
[Datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf)
---
---
# BMP280 Digital Pressure Sensor
registers map
<img src="/sensors/bmp280_registers.png" class="rounded">
[Datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf)
---
# Reading from a digital sensor
using synchronous/asynchronous I2C to read the `press_lsb` register of BMP280
<!-- <img src="/sensors/spi_read_register.svg" class="rounded w-200"> -->
<div grid="~ cols-2 gap-5">
```rust{all|1|1,2|4|6,7|9,10}
const DEVICE_ADDR: u8 = 0x77;
const REG_ADDR: u8 = 0xf8;
i2c.write(DEVICE_ADDR, &[REG_ADDR]).unwrap();
let mut buf = [0x00u8];
i2c.read(DEVICE_ADDR, &mut buf).unwrap();
// use the value
let pressure_lsb = buf[1];
```
```rust{none|all||1|1,2|4|6,7|9,10}
const DEVICE_ADDR: u8 = 0x77;
const REG_ADDR: u8 = 0xf8;
i2c.write(DEVICE_ADDR, &[REG_ADDR]).await.unwrap();
let mut buf = [0x00u8];
i2c.read(DEVICE_ADDR, &mut buf).await.unwrap();
// use the value
let pressure_lsb = buf[1];
```
</div>
---
---
# Writing to a digital sensor
using synchronous/asynchronous I2C to set up the `ctrl_meas` register of the BMP280 sensor
<!-- <img src="/sensors/spi_write_register.svg" class="rounded w-200"> -->
<div grid="~ cols-2 gap-5">
```rust{all|1|1,2|4,5|7|9,10}
const DEVICE_ADDR: u8 = 0x77;
const REG_ADDR: u8 = 0xf4;
// see subchapters 3.3.2, 3.3.1 and 3.6
let value = 0b100_010_11;
i2c.write(DEVICE_ADDR, &[REG_ADDR]);
let buf = [REG_ADDR, value];
i2c.write(DEVICE_ADDR, &buf).unwrap();
```
```rust{none|all|1|1,2|4,5|7|9,10}
const DEVICE_ADDR: u8 = 0x77;
const REG_ADDR: u8 = 0xf4;
// see subchapters 3.3.2, 3.3.1 and 3.6
let value = 0b100_010_11;
i2c.write(DEVICE_ADDR, &[REG_ADDR]);
let buf = [REG_ADDR, value];
i2c.write(DEVICE_ADDR, &buf).await.unwrap();
```
</div>
{
"signal": [
{
"name": "CS",
"wave": "1.0...................................1..",
"period": 1
},
{
"name": "Clock",
"wave": "l.PPPPPPPPl.PPPPPPPPl",
"phase": 1,
"period": 2
},
{
"name": "MOSI",
"wave": "zz6.5.5.5.5.5.5.5.xxxxxxxxxxxxxxxxxxxxz..",
"data": [
"1",
"1",
"1",
"1",
"1",
"0",
"0",
"0"
],
"period": 1
},
{
"name": "MISO",
"wave": "zzxxxxxxxxxxxxxxxxxxxx4.4.4.4.4.4.4.4.zzz",
"data": [
"b7",
"b6",
"b5",
"b4",
"b3",
"b2",
"b1",
"b0"
],
"period": 1
},
{
"name": "data",
"wave": "xx6.5.............xxxx4...............xxx",
"data": [
"r/w",
"register address (press_lsb, 0xf8)",
"register value (press_lsb)"
],
"period": 1
}
],
"config": {
"skin": "narrow"
}
}
\ No newline at end of file
{
"signal": [
{
"name": "CS",
"wave": "1.0...................................1..",
"period": 1
},
{
"name": "Clock",
"wave": "l.PPPPPPPPl.PPPPPPPPl",
"phase": 1,
"period": 2
},
{
"name": "MOSI",
"wave": "zz6.5.5.5.5.5.5.5.xxxx4.4.4.3.3.3.7.7.z..",
"data": [
"0",
"1",
"1",
"1",
"0",
"1",
"0",
"0",
"1",
"0",
"0",
"0",
"1",
"0",
"1",
"1"
],
"period": 1
},
{
"name": "MISO",
"wave": "zzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.zzz",
"period": 1
},
{
"name": "data",
"wave": "xx6.5.............xxxx4.....3.....7...xxx",
"data": [
"r/w",
"register address (ctrl_meas, 0xf4)",
"osrs_t",
"osrs_p",
"mode"
],
"period": 1
}
],
"config": {
"skin": "narrow"
}
}
\ No newline at end of file
...@@ -11,18 +11,18 @@ drawings: ...@@ -11,18 +11,18 @@ drawings:
defaults: defaults:
foo: true foo: true
transition: slide-left transition: slide-left
title: MA - 07 - I2C & USB 2.0 title: MA - 06 - I2C & USB 2.0
mdc: true mdc: true
layout: cover layout: cover
themeConfig: themeConfig:
primary: '#0060df' primary: '#0060df'
download: true download: true
exportFilename: ma-07 exportFilename: ma-06
background: background:
--- ---
# I2C & USB 2.0 # I2C & USB 2.0
Lecture 7 Lecture 6
--- ---
...@@ -39,16 +39,16 @@ used by RP2040 ...@@ -39,16 +39,16 @@ used by RP2040
src: ../../resources/i2c/slides.md src: ../../resources/i2c/slides.md
--- ---
<!-- USB --> <!-- Sensors -->
--- ---
src: ../../resources/usb/slides.md src: ../../resources/sensors_i2c/slides.md
--- ---
<!-- Sensors --> <!-- USB -->
--- ---
src: ../../resources/sensors_i2c/slides.md src: ../../resources/usb/slides.md
--- ---
--- ---
......
---
layout: section
---
# USB 2.0
Universal Serial Bus
---
layout: two-cols
---
# Universal Serial Bus
2.0
- Used for communication between a host and several devices that each provide functions
- Two modes:
- *host* - initiates the communication (usually a computer)
- *device* - receives and transmits data when the *host* requests it
- each device has a 7 bit address assigned upon connect
- maximum 127 devices connected to a USB host
- devices are interconnected using *hubs*
- USB devices tree
:: right ::
```mermaid
flowchart
H(Host) --> Hub1(Hub)
Hub1 --> Hub2(Hub)
Hub1 --> D1(Device 1)
Hub1 --> Hub3(Hub)
Hub2 --> Hub4(Hub)
Hub2 --> D3(Device 3)
Hub4 --> D4(Device 4)
Hub4 --> D5(Device 5)
Hub3 --> D2(Device 2)
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class H host
class Hub1,Hub2,Hub3,Hub4 hub
class D1,D2,D3,D4,D5 device
class E exception
class R3,F2 error
class S3 start
```
---
---
# Bibliography
for this section
1. **Raspberry Pi Ltd**, *[RP2040 Datasheet](https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf)*
- Chapter 4 - *Peripherals*
- Chapter 4.1 - *USB*
2. *[USB Made Simple](https://www.usbmadesimple.co.uk/)*
---
layout: two-cols
---
# USB Device
<style>
.two-columns {
grid-template-columns: 3fr 6fr;
}
</style>
- can work as **host** or **device**, but not at the same time
- uses a differential line for transmission
- uses a 48 MHz clock
- maximum 16 endpoints (buffers)
- *IN* - from **device** to **host**
- *OUT* - from **host** to **device**
- endpoints 0 IN and OUT are used for control
:: right ::
<div align="center">
<img src="/usb/usb_device.svg" class="rounded">
</div>
---
# USB Packet
the smallest element of data transmission
<style>
img {
background: #ffffff;
}
</style>
Token
<div align="center">
<img src="/usb/usb_packet_token.svg" class="rounded">
</div>
Data
<div align="center">
<img src="/usb/usb_packet_data.svg" class="rounded">
</div>
Handshake
<div align="center">
<img src="/usb/usb_packet_handshake.svg" class="rounded">
</div>
---
# Token Packet
usually asks for a data transmission
<style>
img {
background: #ffffff;
}
</style>
| Type | PID | Description |
|-|-|-|
| *OUT* | `0001` | **host** wants to transmit data to the **device** |
| *IN* | `1001` | **host** wants to receive data from the **device** |
| *SETUP* | `1101` | **host** wants to setup the **device** |
Address: `ADDR`:`ENDP`
<div align="center">
<img src="/usb/usb_packet_token.svg" class="rounded">
</div>
---
# Data Packet
transmits data
<style>
img {
background: #ffffff;
}
</style>
| Type | PID | Description |
|-|-|-|
| *DATA0* | `0011` | the data packet is the first one or follows after a `DATA1` packet |
| *DATA1* | `1011` | the data packet follows after a `DATA0` packet |
Data can be between 0 and 1024 bytes
<div align="center">
<img src="/usb/usb_packet_data.svg" class="rounded">
</div>
---
# Handshake Packet
acknowledges data
<style>
img {
background: #ffffff;
}
</style>
| Type | PID | Description |
|-|-|-|
| *ACK* | `0010` | data has been **successfully received** |
| *NACK* | `1010` | data has **not** been **successfully received** |
| *STALL* | `1110` | the device has an **error** |
<div align="center">
<img src="/usb/usb_packet_handshake.svg" class="rounded">
</div>
---
---
# Transmission Modes
- *Control* - used for configuration
- *Isochronous* - used for high bandwidth, best effort
- *Bulk* - used for low bandwidth, stream
- *Interrupt* - used for low bandwidth, guaranteed latency
---
---
# Control
used to control a device - ask for data
<div grid="~ cols-2 gap-5">
<div>
<v-click>
**Setup** - send a command (*GET_DESCRIPTOR*, ...)
```mermaid {scale: 0.8}
flowchart LR
I(Idle) --> S
S(Token
SETUP) --> D(Data,
DATA0
8 bytes)
S -- Error --> I2(Idle)
D --> A(Handshake
ACK)
D -- Error --> I2
A --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,D host
class A device
class I,I2 start
```
</v-click>
<v-click>
**Data** - *optional* several transfers, host transfers data
```mermaid {scale: 0.8}
flowchart LR
I(Idle) --> S
S(Token
OUT) --> D1(Data
DATA1)
D1 -- Error --> I2(Idle)
S -- Error --> I2
D1 --> A(Handshake
ACK)
A --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,D1 host
class A device
class I,I2 start
```
</v-click>
</div>
<div>
<v-after>
```mermaid {scale: 0.8}
flowchart LR
I(Idle) --> S
S(Token
OUT) --> D0(Data
DATA0)
D0 -- Error --> I2(Idle)
S -- Error --> I2
D0 --> A(Handshake
ACK)
A --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,D0 host
class A device
class I,I2 start
```
...
</v-after>
<v-click>
**Status** - report the status to the host
```mermaid {scale: 0.8}
flowchart LR
I(Idle) --> S
S(Token
IN) --> D1(Data,
DATA1)
S -- Error --> I2(Idle)
D1 --> A(Handshake
ACK)
D1 -- Error --> I2
A --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,A host
class D1 device
class I,I2 start
```
</v-click>
</div>
</div>
---
# Control
used to control a device - send data
<div grid="~ cols-2 gap-5">
<div>
<v-click>
**Setup** - send a command (*SET_ADDRESS*, ...)
```mermaid {scale: 0.75}
flowchart LR
I(Idle) --> S
S(Token
SETUP) --> D(Data,
DATA0
8 bytes)
S -- Error --> I2(Idle)
D --> A(Handshake
ACK)
D -- Error --> I2
A --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,D host
class A device
class I,I2 start
```
</v-click>
<v-click>
**Data** - *optional* several transfers, device transfers the requested data
```mermaid {scale: 0.75}
flowchart LR
I(Idle) --> S
S(Token
IN) --> D1(Data
DATA1)
D1 -- Error --> I2(Idle)
S -- Error --> I2
D1 --> A(Handshake
ACK)
A --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,A host
class D1 device
class I,I2 start
```
</v-click>
</div>
<div>
<v-after>
```mermaid {scale: 0.8}
flowchart LR
I(Idle) --> S
S(Token
IN) --> D0(Data
DATA0)
D0 -- Error --> I2(Idle)
S -- Error --> I2
D0 --> A(Handshake
ACK)
A --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,A host
class D0 device
class I,I2 start
```
...
</v-after>
<v-click>
**Status** - report the status to the device
```mermaid {scale: 0.8}
flowchart LR
I(Idle) --> S
S(Token
OUT) --> D1(Data,
DATA1)
S -- Error --> I2(Idle)
D1 --> A(Handshake
ACK)
D1 -- Error --> I2
A --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,D1 host
class A device
class I,I2 start
```
</v-click>
</div>
</div>
---
---
# Isochronous
fast but not reliable transfer
- has a guaranteed bandwidth
- allows data loss
- used for functions like streaming where loosing a packet has a minimal impact
<div grid="~ cols-2 gap-5">
<div>
<v-click>
**OUT** - transfer data from the host to the device
```mermaid {scale: 0.8}
flowchart LR
I(Idle) --> S
S(Token
OUT) --> D0(Data,
DATAx)
S -- Error --> I2(Idle)
D0 --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,D0 host
class I,I2 start
```
</v-click>
</div>
<div>
<v-click>
**IN** - transfer data from the device to the host
```mermaid {scale: 0.8}
flowchart LR
I(Idle) --> S
S(Token
IN) --> D0(Data,
DATAx)
S -- Error --> I2(Idle)
D0 --> I2(Idle)
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S host
class D0 device
class I,I2 start
```
</v-click>
</div>
</div>
---
---
# Bulk
slow, but reliable transfer
- does not have a guaranteed bandwidth
- secure transfer
- used for large data transfers where loosing packets is not permitted
<div grid="~ cols-2 gap-5">
<div>
<v-click>
**OUT** - transfer data from the host to the device
```mermaid {scale: 0.69}
flowchart LR
I(Idle) --> S
S(Token
OUT) --> D0(Data,
DATAx)
S -- Error --> I2(Idle)
D0 -- Device Error --> SA(Handshake
STALL)
D0 -- Packet Error --> N(Handshake
NACK)
D0 --> A(Handshake
ACK)
A --> I2(Idle)
N --> I2
SA --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,D0 host
class A,N,SA device
class I,I2 start
```
</v-click>
</div>
<div>
<v-click>
**IN** - transfer data from the device to the host
```mermaid {scale: 0.69}
flowchart LR
I(Idle) --> S
S(Token
IN) --> D0(Data,
DATAx)
S -- Error --> I2(Idle)
D0 -- Device Error --> SA(Handshake
STALL)
D0 -- Packet Error --> N(Handshake
NACK)
D0 --> A(Handshake
ACK)
A --> I2
N --> I2
SA --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,A,N,SA host
class D0 device
class I,I2 start
```
</v-click>
</div>
</div>
---
---
# Interrupt
transfer data at a minimum time interval
- the endpoint descriptor asks the host start an interrupt transfer at a time interval
- used for sending and receiving data at certain intervals
<div grid="~ cols-2 gap-5">
<div>
<v-click>
**OUT** - transfer data from the host to the device
```mermaid {scale: 0.69}
flowchart LR
I(Idle) --> S
S(Token
OUT) --> D0(Data,
DATAx)
S -- Error --> I2(Idle)
D0 -- Device Error --> SA(Handshake
STALL)
D0 -- Packet Error --> N(Handshake
NACK)
D0 --> A(Handshake
ACK)
A --> I2(Idle)
N --> I2
SA --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,D0 host
class A,N,SA device
class I,I2 start
```
</v-click>
</div>
<div>
<v-click>
**IN** - transfer data from the device to the host
```mermaid {scale: 0.69}
flowchart LR
I(Idle) --> S
S(Token
IN) --> D0(Data,
DATAx)
S -- Error --> I2(Idle)
D0 -- Device Error --> SA(Handshake
STALL)
D0 -- Packet Error --> N(Handshake
NACK)
D0 --> A(Handshake
ACK)
A --> I2
N --> I2
SA --> I2
classDef hub fill:#B0E3E6,stroke:#0E8088
classDef host fill:#B1DDF0,stroke:#10739E
classDef device fill:#FFE6CC,stroke:#D79B00
classDef exception fill:#F8CECC,stroke:#B85450
classDef error fill:#ff0000,stroke:#ae0000,color:#ffffff
classDef start fill:#00ef00
class S,A,N,SA host
class D0 device
class I,I2 start
```
</v-click>
</div>
</div>
---
layout: two-cols
---
# Device Organization
configuration, interfaces, endpoints
- a device can have multiple configurations
- for instance different functionality based on power consumption
- a configuration has multiple interfaces
- a device can perform multiple functions
- Debugger
- Serial Port
- each interface has multiple interfaces attached
- endpoints are used for data transfer
- maximum 16 endpoints, can be configured IN and OUT
- the device reports the descriptors in this order
:: right ::
<div align="center">
<img src="/usb/usb_device_descriptor.svg" class="rounded w-70">
</div>
---
layout: two-cols
---
# Connection
<style>
img {
background: #ffffff;
}
</style>
```mermaid {scale: 0.45}
sequenceDiagram
create participant Host
activate Host
create participant Device
Host -->> Device: device plugged in, Reset
Host ->> +Device: SETUP: GET_DEVICE_DESCRIPTOR (address 0, EP 0 IN)
Device -->> -Host: DATA: Device Descriptor (EP 0 IN)
Host -->> Device: Reset
Host ->> +Device: SETUP: SET_ADDRESS (A) (address 0, EP 0 OUT)
Device -->> -Host: ACK: (EP 0 OUT)
Host ->> +Device: SETUP: GET_DEVICE_DESCRIPTOR (address A, EP 0 IN)
Device -->> Host: DATA: Device Descriptor (EP 0 IN)
Host -->> Device: ACK (EP 0 IN)
deactivate Device
Host ->> +Device: SETUP: GET_CONFIGURATION_DESCRIPTOR (1) (address A, EP 0 IN)
Device -->> Host: DATA: Configuration Descriptor (EP 0 IN)
Host -->> Device: ACK (EP 0 IN)
deactivate Device
Host ->> +Device: SETUP: SET_CONFIGURATION (1) (address A, EP 0 OUT)
Device -->> Host: ACK (EP 0 OUT)
deactivate Device
deactivate Host
```
:: right ::
# Token SETUP Packet
The DATA packet of the SETUP Control Transfer
<div align="center">
<img src="/usb/usb_setup_request.svg" class="rounded">
</div>
*bmRequestType* field
<div align="center">
<img src="/usb/usb_bmrequest.svg" class="rounded">
</div>
---
---
# USB 1.0 and 2.0 Modes
| Mode | Speed | Version |
|-|-|-|
| Low Speed | 1.5 Mbit/s | 1.0 |
| Full Speed | 12 Mbit/s | 1.0 |
| High Speed | 480 Mbit/s | 2.0 |
---
---
# Facts
| | | |
|-|-|-|
| Transmission | *half duplex* | data must be sent in one direction at one time |
| Clock | *independent* | the **host** and the **device** must synchronize their clocks |
| Wires | *DP* / *DM* | data is sent in a differential way |
| Devices | *1 host* <br> *several devices* | a receiver and a transmitter |
| Speed | *480 MBbit/s* | |
---
layout: two-cols
---
# Embassy API
for RP2040, setup the device
```rust {*}{lines: false}
use embassy_rp::usb::{Driver, Instance, InterruptHandler};
use embassy_usb::class::cdc_acm::{CdcAcmClass, State};
bind_interrupts!(struct Irqs {
USBCTRL_IRQ => InterruptHandler<USB>;
});
let driver = Driver::new(p.USB, Irqs);
let mut config = Config::new(0xc0de, 0xcafe);
config.manufacturer = Some("Embassy");
config.product = Some("USB-serial example");
config.serial_number = Some("12345678");
config.max_power = 100;
config.max_packet_size_0 = 64;
// Required for windows compatibility.
config.device_class = 0xEF;
config.device_sub_class = 0x02;
config.device_protocol = 0x01;
config.composite_with_iads = true;
```
:: right ::
```rust {*}{lines: false}
// It needs some buffers for building the descriptors.
let mut config_descriptor = [0; 256];
let mut bos_descriptor = [0; 256];
let mut control_buf = [0; 64];
let mut state = State::new();
let mut builder = Builder::new(
driver,
config,
&mut config_descriptor,
&mut bos_descriptor,
&mut [], // no msos descriptors
&mut control_buf,
);
// Create classes on the builder.
let mut class = CdcAcmClass::new(&mut builder, &mut state, 64);
// Build the builder.
let mut usb = builder.build();
// Run the USB device.
let usb_driver = usb.run();
```
---
---
# Embassy API
for RP2040, use the USB device
```rust
let echo_loop = async {
loop {
class.wait_connection().await;
info!("Connected");
let _ = echo(&mut class).await;
info!("Disconnected");
}
};
// Run everything concurrently.
join(usb_driver, echo_loop).await;
```
```rust
async fn echo<'d, T: Instance + 'd>(class: &mut CdcAcmClass<'d, Driver<'d, T>>) -> Result<(), EndpointError> {
let mut buf = [0; 64];
loop {
let n = class.read_packet(&mut buf).await?;
let data = &buf[..n];
info!("data: {:x}", data);
class.write_packet(data).await?;
}
}
```
{
"reg": [
{
"bits": 5,
"name": "Recipient",
"type": 7,
"attr": [
"00000 - Device",
"00001 - Interface",
"00010 - Endpoint",
"00011 - Other",
"00100 - 11111 - Reserved"
]
},
{
"bits": 2,
"name": "Type",
"type": 5,
"attr": [
"00 - Standard",
"01 - Class",
"10 - Vendor",
"11 - Reserved"
]
},
{
"bits": 1,
"name": "Direction",
"type": 3,
"attr": [
"0 - Host to Device",
"1 - Device to Host"
]
}
],
"config": {
"hspace": 950
}
}
<svg xmlns="http://www.w3.org/2000/svg" width="950" height="126" viewBox="0 0 950 126" class="WaveDrom"><g transform="translate(0.5,0.5)" text-anchor="middle" font-size="14" font-family="sans-serif" font-weight="normal"><g transform="translate(4,21)"><g stroke="black" stroke-width="1" stroke-linecap="round"><line x2="941"/><line y2="31"/><line x2="941" y1="31" y2="31"/><line x1="941" x2="941" y2="31"/><line x1="823" x2="823" y2="3"/><line x1="823" x2="823" y1="31" y2="28"/><line x1="706" x2="706" y2="3"/><line x1="706" x2="706" y1="31" y2="28"/><line x1="588" x2="588" y2="3"/><line x1="588" x2="588" y1="31" y2="28"/><line x1="471" x2="471" y2="3"/><line x1="471" x2="471" y1="31" y2="28"/><line x1="353" x2="353" y2="31"/><line x1="235" x2="235" y2="3"/><line x1="235" x2="235" y1="31" y2="28"/><line x1="118" x2="118" y2="31"/></g><g><g><rect x="353" width="588" height="31" field="Recipient" style="fill-opacity:0.1;fill:#006aff"/><rect x="118" width="235" height="31" field="Type" style="fill-opacity:0.1;fill:#ffbf00"/><rect width="118" height="31" field="Direction" style="fill-opacity:0.1;fill:#aaff00"/></g><g transform="translate(59,-11)"><g transform="translate(823)"><text y="6">0</text></g><g transform="translate(353)"><text y="6">4</text></g><g transform="translate(235)"><text y="6">5</text></g><g transform="translate(118)"><text y="6">6</text></g><g transform="translate(0)"><text y="6">7</text></g></g><g transform="translate(59,15)"><g transform="translate(588)"><text y="6"><tspan>Recipient</tspan></text></g><g transform="translate(176)"><text y="6"><tspan>Type</tspan></text></g><g transform="translate(0)"><text y="6"><tspan>Direction</tspan></text></g></g><g transform="translate(59,39)"><g><g transform="translate(588)"><text y="6"><tspan>00000 - Device</tspan></text></g><g transform="translate(588,14)"><text y="6"><tspan>00001 - Interface</tspan></text></g><g transform="translate(588,28)"><text y="6"><tspan>00010 - Endpoint</tspan></text></g><g transform="translate(588,42)"><text y="6"><tspan>00011 - Other</tspan></text></g><g transform="translate(588,56)"><text y="6"><tspan>00100 - 11111 - Reserved</tspan></text></g></g><g><g transform="translate(176)"><text y="6"><tspan>00 - Standard</tspan></text></g><g transform="translate(176,14)"><text y="6"><tspan>01 - Class</tspan></text></g><g transform="translate(176,28)"><text y="6"><tspan>10 - Vendor</tspan></text></g><g transform="translate(176,42)"><text y="6"><tspan>11 - Reserved</tspan></text></g></g><g><g transform="translate(0)"><text y="6"><tspan>0 - Host to Device</tspan></text></g><g transform="translate(0,14)"><text y="6"><tspan>1 - Device to Host</tspan></text></g></g></g></g></g></g></svg>
\ No newline at end of file
This diff is collapsed.
{
"reg": [
{
"bits": 3,
"name": "00J",
"type": 1,
"attr": [
"EOP"
]
},
{
"bits": 16,
"name": "CRC",
"type": 7,
"attr": [
"Endpoint"
]
},
{
"bits": 4,
"name": "ENDP",
"type": 6,
"attr": [
"Endpoint"
]
},
{
"bits": 8,
"name": "0 - 1024 bytes",
"type": 5,
"attr": [
"Data"
]
},
{
"bits": 4,
"name": "PID",
"type": 3,
"attr": [
"Packet ID"
]
},
{
"bits": 4,
"name": "!PID",
"type": 3,
"attr": [
"Inverted",
"Packet ID"
]
},
{
"bits": 8,
"name": 1,
"type": 1,
"attr": [
"SYNC"
]
}
],
"config": {}
}
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="84" viewBox="0 0 800 84" class="WaveDrom"><g transform="translate(0.5,0.5)" text-anchor="middle" font-size="14" font-family="sans-serif" font-weight="normal"><g transform="translate(4,21)"><g stroke="black" stroke-width="1" stroke-linecap="round"><line x2="791"/><line y2="31"/><line x2="791" y1="31" y2="31"/><line x1="791" x2="791" y2="31"/><line x1="774" x2="774" y2="3"/><line x1="774" x2="774" y1="31" y2="28"/><line x1="757" x2="757" y2="3"/><line x1="757" x2="757" y1="31" y2="28"/><line x1="741" x2="741" y2="31"/><line x1="724" x2="724" y2="3"/><line x1="724" x2="724" y1="31" y2="28"/><line x1="707" x2="707" y2="3"/><line x1="707" x2="707" y1="31" y2="28"/><line x1="690" x2="690" y2="3"/><line x1="690" x2="690" y1="31" y2="28"/><line x1="673" x2="673" y2="3"/><line x1="673" x2="673" y1="31" y2="28"/><line x1="656" x2="656" y2="3"/><line x1="656" x2="656" y1="31" y2="28"/><line x1="640" x2="640" y2="3"/><line x1="640" x2="640" y1="31" y2="28"/><line x1="623" x2="623" y2="3"/><line x1="623" x2="623" y1="31" y2="28"/><line x1="606" x2="606" y2="3"/><line x1="606" x2="606" y1="31" y2="28"/><line x1="589" x2="589" y2="3"/><line x1="589" x2="589" y1="31" y2="28"/><line x1="572" x2="572" y2="3"/><line x1="572" x2="572" y1="31" y2="28"/><line x1="555" x2="555" y2="3"/><line x1="555" x2="555" y1="31" y2="28"/><line x1="539" x2="539" y2="3"/><line x1="539" x2="539" y1="31" y2="28"/><line x1="522" x2="522" y2="3"/><line x1="522" x2="522" y1="31" y2="28"/><line x1="505" x2="505" y2="3"/><line x1="505" x2="505" y1="31" y2="28"/><line x1="488" x2="488" y2="3"/><line x1="488" x2="488" y1="31" y2="28"/><line x1="471" x2="471" y2="31"/><line x1="454" x2="454" y2="3"/><line x1="454" x2="454" y1="31" y2="28"/><line x1="438" x2="438" y2="3"/><line x1="438" x2="438" y1="31" y2="28"/><line x1="421" x2="421" y2="3"/><line x1="421" x2="421" y1="31" y2="28"/><line x1="404" x2="404" y2="31"/><line x1="387" x2="387" y2="3"/><line x1="387" x2="387" y1="31" y2="28"/><line x1="370" x2="370" y2="3"/><line x1="370" x2="370" y1="31" y2="28"/><line x1="353" x2="353" y2="3"/><line x1="353" x2="353" y1="31" y2="28"/><line x1="337" x2="337" y2="3"/><line x1="337" x2="337" y1="31" y2="28"/><line x1="320" x2="320" y2="3"/><line x1="320" x2="320" y1="31" y2="28"/><line x1="303" x2="303" y2="3"/><line x1="303" x2="303" y1="31" y2="28"/><line x1="286" x2="286" y2="3"/><line x1="286" x2="286" y1="31" y2="28"/><line x1="269" x2="269" y2="31"/><line x1="252" x2="252" y2="3"/><line x1="252" x2="252" y1="31" y2="28"/><line x1="236" x2="236" y2="3"/><line x1="236" x2="236" y1="31" y2="28"/><line x1="219" x2="219" y2="3"/><line x1="219" x2="219" y1="31" y2="28"/><line x1="202" x2="202" y2="31"/><line x1="185" x2="185" y2="3"/><line x1="185" x2="185" y1="31" y2="28"/><line x1="168" x2="168" y2="3"/><line x1="168" x2="168" y1="31" y2="28"/><line x1="151" x2="151" y2="3"/><line x1="151" x2="151" y1="31" y2="28"/><line x1="135" x2="135" y2="31"/><line x1="118" x2="118" y2="3"/><line x1="118" x2="118" y1="31" y2="28"/><line x1="101" x2="101" y2="3"/><line x1="101" x2="101" y1="31" y2="28"/><line x1="84" x2="84" y2="3"/><line x1="84" x2="84" y1="31" y2="28"/><line x1="67" x2="67" y2="3"/><line x1="67" x2="67" y1="31" y2="28"/><line x1="50" x2="50" y2="3"/><line x1="50" x2="50" y1="31" y2="28"/><line x1="34" x2="34" y2="3"/><line x1="34" x2="34" y1="31" y2="28"/><line x1="17" x2="17" y2="3"/><line x1="17" x2="17" y1="31" y2="28"/></g><g><g><rect x="741" width="50" height="31" field="00J" style="fill-opacity:0.1"/><rect x="471" width="269" height="31" field="CRC" style="fill-opacity:0.1;fill:#006aff"/><rect x="404" width="67" height="31" field="ENDP" style="fill-opacity:0.1;fill:#00ff19"/><rect x="269" width="135" height="31" field="0 - 1024 bytes" style="fill-opacity:0.1;fill:#ffbf00"/><rect x="202" width="67" height="31" field="PID" style="fill-opacity:0.1;fill:#aaff00"/><rect x="135" width="67" height="31" field="!PID" style="fill-opacity:0.1;fill:#aaff00"/><rect width="135" height="31" field="1" style="fill-opacity:0.1"/></g><g transform="translate(8,-11)"><g transform="translate(774)"><text y="6">0</text></g><g transform="translate(741)"><text y="6">2</text></g><g transform="translate(724)"><text y="6">3</text></g><g transform="translate(471)"><text y="6">18</text></g><g transform="translate(454)"><text y="6">19</text></g><g transform="translate(404)"><text y="6">22</text></g><g transform="translate(387)"><text y="6">23</text></g><g transform="translate(269)"><text y="6">30</text></g><g transform="translate(252)"><text y="6">31</text></g><g transform="translate(202)"><text y="6">34</text></g><g transform="translate(185)"><text y="6">35</text></g><g transform="translate(135)"><text y="6">38</text></g><g transform="translate(118)"><text y="6">39</text></g><g transform="translate(0)"><text y="6">46</text></g></g><g transform="translate(8,15)"><g transform="translate(757)"><text y="6"><tspan>00J</tspan></text></g><g transform="translate(597)"><text y="6"><tspan>CRC</tspan></text></g><g transform="translate(429)"><text y="6"><tspan>ENDP</tspan></text></g><g transform="translate(328)"><text y="6"><tspan>0 - 1024 bytes</tspan></text></g><g transform="translate(227)"><text y="6"><tspan>PID</tspan></text></g><g transform="translate(160)"><text y="6"><tspan>!PID</tspan></text></g><g><g transform="translate(118)"><text y="6">1</text></g><g transform="translate(101)"><text y="6">0</text></g><g transform="translate(84)"><text y="6">0</text></g><g transform="translate(67)"><text y="6">0</text></g><g transform="translate(50)"><text y="6">0</text></g><g transform="translate(34)"><text y="6">0</text></g><g transform="translate(17)"><text y="6">0</text></g><g transform="translate(0)"><text y="6">0</text></g></g></g><g transform="translate(8,39)"><g><g transform="translate(757)"><text y="6"><tspan>EOP</tspan></text></g></g><g><g transform="translate(597)"><text y="6"><tspan>Endpoint</tspan></text></g></g><g><g transform="translate(429)"><text y="6"><tspan>Endpoint</tspan></text></g></g><g><g transform="translate(328)"><text y="6"><tspan>Data</tspan></text></g></g><g><g transform="translate(227)"><text y="6"><tspan>Packet ID</tspan></text></g></g><g><g transform="translate(160)"><text y="6"><tspan>Inverted</tspan></text></g><g transform="translate(160,14)"><text y="6"><tspan>Packet ID</tspan></text></g></g><g><g transform="translate(59)"><text y="6"><tspan>SYNC</tspan></text></g></g></g></g></g></g></svg>
\ No newline at end of file
{
"reg": [
{
"bits": 3,
"name": "00J",
"type": 1,
"attr": [
"EOP"
]
},
{
"bits": 4,
"name": "PID",
"type": 3,
"attr": [
"Packet ID"
]
},
{
"bits": 4,
"name": "!PID",
"type": 3,
"attr": [
"Inverted",
"Packet ID"
]
},
{
"bits": 8,
"name": 1,
"type": 1,
"attr": [
"SYNC"
]
}
],
"config": {
"hspace": 350
}
}
<svg xmlns="http://www.w3.org/2000/svg" width="350" height="84" viewBox="0 0 350 84" class="WaveDrom"><g transform="translate(0.5,0.5)" text-anchor="middle" font-size="14" font-family="sans-serif" font-weight="normal"><g transform="translate(4,21)"><g stroke="black" stroke-width="1" stroke-linecap="round"><line x2="341"/><line y2="31"/><line x2="341" y1="31" y2="31"/><line x1="341" x2="341" y2="31"/><line x1="323" x2="323" y2="3"/><line x1="323" x2="323" y1="31" y2="28"/><line x1="305" x2="305" y2="3"/><line x1="305" x2="305" y1="31" y2="28"/><line x1="287" x2="287" y2="31"/><line x1="269" x2="269" y2="3"/><line x1="269" x2="269" y1="31" y2="28"/><line x1="251" x2="251" y2="3"/><line x1="251" x2="251" y1="31" y2="28"/><line x1="233" x2="233" y2="3"/><line x1="233" x2="233" y1="31" y2="28"/><line x1="215" x2="215" y2="31"/><line x1="197" x2="197" y2="3"/><line x1="197" x2="197" y1="31" y2="28"/><line x1="179" x2="179" y2="3"/><line x1="179" x2="179" y1="31" y2="28"/><line x1="162" x2="162" y2="3"/><line x1="162" x2="162" y1="31" y2="28"/><line x1="144" x2="144" y2="31"/><line x1="126" x2="126" y2="3"/><line x1="126" x2="126" y1="31" y2="28"/><line x1="108" x2="108" y2="3"/><line x1="108" x2="108" y1="31" y2="28"/><line x1="90" x2="90" y2="3"/><line x1="90" x2="90" y1="31" y2="28"/><line x1="72" x2="72" y2="3"/><line x1="72" x2="72" y1="31" y2="28"/><line x1="54" x2="54" y2="3"/><line x1="54" x2="54" y1="31" y2="28"/><line x1="36" x2="36" y2="3"/><line x1="36" x2="36" y1="31" y2="28"/><line x1="18" x2="18" y2="3"/><line x1="18" x2="18" y1="31" y2="28"/></g><g><g><rect x="287" width="54" height="31" field="00J" style="fill-opacity:0.1"/><rect x="215" width="72" height="31" field="PID" style="fill-opacity:0.1;fill:#aaff00"/><rect x="144" width="72" height="31" field="!PID" style="fill-opacity:0.1;fill:#aaff00"/><rect width="144" height="31" field="1" style="fill-opacity:0.1"/></g><g transform="translate(9,-11)"><g transform="translate(323)"><text y="6">0</text></g><g transform="translate(287)"><text y="6">2</text></g><g transform="translate(269)"><text y="6">3</text></g><g transform="translate(215)"><text y="6">6</text></g><g transform="translate(197)"><text y="6">7</text></g><g transform="translate(144)"><text y="6">10</text></g><g transform="translate(126)"><text y="6">11</text></g><g transform="translate(0)"><text y="6">18</text></g></g><g transform="translate(9,15)"><g transform="translate(305)"><text y="6"><tspan>00J</tspan></text></g><g transform="translate(242)"><text y="6"><tspan>PID</tspan></text></g><g transform="translate(171)"><text y="6"><tspan>!PID</tspan></text></g><g><g transform="translate(126)"><text y="6">1</text></g><g transform="translate(108)"><text y="6">0</text></g><g transform="translate(90)"><text y="6">0</text></g><g transform="translate(72)"><text y="6">0</text></g><g transform="translate(54)"><text y="6">0</text></g><g transform="translate(36)"><text y="6">0</text></g><g transform="translate(18)"><text y="6">0</text></g><g transform="translate(0)"><text y="6">0</text></g></g></g><g transform="translate(9,39)"><g><g transform="translate(305)"><text y="6"><tspan>EOP</tspan></text></g></g><g><g transform="translate(242)"><text y="6"><tspan>Packet ID</tspan></text></g></g><g><g transform="translate(171)"><text y="6"><tspan>Inverted</tspan></text></g><g transform="translate(171,14)"><text y="6"><tspan>Packet ID</tspan></text></g></g><g><g transform="translate(63)"><text y="6"><tspan>SYNC</tspan></text></g></g></g></g></g></g></svg>
\ No newline at end of file
{
"reg": [
{
"bits": 3,
"name": "00J",
"type": 1,
"attr": [
"EOP"
]
},
{
"bits": 5,
"name": "CRC",
"type": 7,
"attr": [
"Endpoint"
]
},
{
"bits": 4,
"name": "ENDP",
"type": 6,
"attr": [
"Endpoint"
]
},
{
"bits": 7,
"name": "ADDR",
"type": 5,
"attr": [
"Address"
]
},
{
"bits": 4,
"name": "PID",
"type": 3,
"attr": [
"Packet ID"
]
},
{
"bits": 4,
"name": "!PID",
"type": 3,
"attr": [
"Inverted",
"Packet ID"
]
},
{
"bits": 8,
"name": 1,
"type": 1,
"attr": [
"SYNC"
]
}
],
"config": {
"hspace": 690
}
}
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="690" height="84" viewBox="0 0 690 84" class="WaveDrom"><g transform="translate(0.5,0.5)" text-anchor="middle" font-size="14" font-family="sans-serif" font-weight="normal"><g transform="translate(4,21)"><g stroke="black" stroke-width="1" stroke-linecap="round"><line x2="681"/><line y2="31"/><line x2="681" y1="31" y2="31"/><line x1="681" x2="681" y2="31"/><line x1="662" x2="662" y2="3"/><line x1="662" x2="662" y1="31" y2="28"/><line x1="642" x2="642" y2="3"/><line x1="642" x2="642" y1="31" y2="28"/><line x1="623" x2="623" y2="31"/><line x1="603" x2="603" y2="3"/><line x1="603" x2="603" y1="31" y2="28"/><line x1="584" x2="584" y2="3"/><line x1="584" x2="584" y1="31" y2="28"/><line x1="564" x2="564" y2="3"/><line x1="564" x2="564" y1="31" y2="28"/><line x1="545" x2="545" y2="3"/><line x1="545" x2="545" y1="31" y2="28"/><line x1="525" x2="525" y2="31"/><line x1="506" x2="506" y2="3"/><line x1="506" x2="506" y1="31" y2="28"/><line x1="486" x2="486" y2="3"/><line x1="486" x2="486" y1="31" y2="28"/><line x1="467" x2="467" y2="3"/><line x1="467" x2="467" y1="31" y2="28"/><line x1="448" x2="448" y2="31"/><line x1="428" x2="428" y2="3"/><line x1="428" x2="428" y1="31" y2="28"/><line x1="409" x2="409" y2="3"/><line x1="409" x2="409" y1="31" y2="28"/><line x1="389" x2="389" y2="3"/><line x1="389" x2="389" y1="31" y2="28"/><line x1="370" x2="370" y2="3"/><line x1="370" x2="370" y1="31" y2="28"/><line x1="350" x2="350" y2="3"/><line x1="350" x2="350" y1="31" y2="28"/><line x1="331" x2="331" y2="3"/><line x1="331" x2="331" y1="31" y2="28"/><line x1="311" x2="311" y2="31"/><line x1="292" x2="292" y2="3"/><line x1="292" x2="292" y1="31" y2="28"/><line x1="272" x2="272" y2="3"/><line x1="272" x2="272" y1="31" y2="28"/><line x1="253" x2="253" y2="3"/><line x1="253" x2="253" y1="31" y2="28"/><line x1="233" x2="233" y2="31"/><line x1="214" x2="214" y2="3"/><line x1="214" x2="214" y1="31" y2="28"/><line x1="195" x2="195" y2="3"/><line x1="195" x2="195" y1="31" y2="28"/><line x1="175" x2="175" y2="3"/><line x1="175" x2="175" y1="31" y2="28"/><line x1="156" x2="156" y2="31"/><line x1="136" x2="136" y2="3"/><line x1="136" x2="136" y1="31" y2="28"/><line x1="117" x2="117" y2="3"/><line x1="117" x2="117" y1="31" y2="28"/><line x1="97" x2="97" y2="3"/><line x1="97" x2="97" y1="31" y2="28"/><line x1="78" x2="78" y2="3"/><line x1="78" x2="78" y1="31" y2="28"/><line x1="58" x2="58" y2="3"/><line x1="58" x2="58" y1="31" y2="28"/><line x1="39" x2="39" y2="3"/><line x1="39" x2="39" y1="31" y2="28"/><line x1="19" x2="19" y2="3"/><line x1="19" x2="19" y1="31" y2="28"/></g><g><g><rect x="623" width="58" height="31" field="00J" style="fill-opacity:0.1"/><rect x="525" width="97" height="31" field="CRC" style="fill-opacity:0.1;fill:#006aff"/><rect x="448" width="78" height="31" field="ENDP" style="fill-opacity:0.1;fill:#00ff19"/><rect x="311" width="136" height="31" field="ADDR" style="fill-opacity:0.1;fill:#ffbf00"/><rect x="233" width="78" height="31" field="PID" style="fill-opacity:0.1;fill:#aaff00"/><rect x="156" width="78" height="31" field="!PID" style="fill-opacity:0.1;fill:#aaff00"/><rect width="156" height="31" field="1" style="fill-opacity:0.1"/></g><g transform="translate(10,-11)"><g transform="translate(662)"><text y="6">0</text></g><g transform="translate(623)"><text y="6">2</text></g><g transform="translate(603)"><text y="6">3</text></g><g transform="translate(525)"><text y="6">7</text></g><g transform="translate(506)"><text y="6">8</text></g><g transform="translate(448)"><text y="6">11</text></g><g transform="translate(428)"><text y="6">12</text></g><g transform="translate(311)"><text y="6">18</text></g><g transform="translate(292)"><text y="6">19</text></g><g transform="translate(233)"><text y="6">22</text></g><g transform="translate(214)"><text y="6">23</text></g><g transform="translate(156)"><text y="6">26</text></g><g transform="translate(136)"><text y="6">27</text></g><g transform="translate(0)"><text y="6">34</text></g></g><g transform="translate(10,15)"><g transform="translate(642)"><text y="6"><tspan>00J</tspan></text></g><g transform="translate(564)"><text y="6"><tspan>CRC</tspan></text></g><g transform="translate(477)"><text y="6"><tspan>ENDP</tspan></text></g><g transform="translate(370)"><text y="6"><tspan>ADDR</tspan></text></g><g transform="translate(263)"><text y="6"><tspan>PID</tspan></text></g><g transform="translate(185)"><text y="6"><tspan>!PID</tspan></text></g><g><g transform="translate(136)"><text y="6">1</text></g><g transform="translate(117)"><text y="6">0</text></g><g transform="translate(97)"><text y="6">0</text></g><g transform="translate(78)"><text y="6">0</text></g><g transform="translate(58)"><text y="6">0</text></g><g transform="translate(39)"><text y="6">0</text></g><g transform="translate(19)"><text y="6">0</text></g><g transform="translate(0)"><text y="6">0</text></g></g></g><g transform="translate(10,39)"><g><g transform="translate(642)"><text y="6"><tspan>EOP</tspan></text></g></g><g><g transform="translate(564)"><text y="6"><tspan>Endpoint</tspan></text></g></g><g><g transform="translate(477)"><text y="6"><tspan>Endpoint</tspan></text></g></g><g><g transform="translate(370)"><text y="6"><tspan>Address</tspan></text></g></g><g><g transform="translate(263)"><text y="6"><tspan>Packet ID</tspan></text></g></g><g><g transform="translate(185)"><text y="6"><tspan>Inverted</tspan></text></g><g transform="translate(185,14)"><text y="6"><tspan>Packet ID</tspan></text></g></g><g><g transform="translate(68)"><text y="6"><tspan>SYNC</tspan></text></g></g></g></g></g></g></svg>
\ No newline at end of file
{
"reg": [
{
"bits": 16,
"name": "wLength",
"type": 7,
"attr": [
"Number of bytes to transfer in DATA step"
]
},
{
"bits": 16,
"name": "wIndex",
"type": 5,
"attr": [
"Index of offset"
]
},
{
"bits": 16,
"name": "wValue",
"type": 5,
"attr": [
"Value"
]
},
{
"bits": 8,
"name": "bRequest",
"type": 3,
"attr": [
"Specific to request"
]
},
{
"bits": 8,
"name": "bmRequestType",
"type": 3
}
],
"config": {
"lanes": 2
}
}
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="140" viewBox="0 0 800 140" class="WaveDrom"><g transform="translate(0.5,0.5)" text-anchor="middle" font-size="14" font-family="sans-serif" font-weight="normal"><g transform="translate(4,91)"><g stroke="black" stroke-width="1" stroke-linecap="round"><line x2="791"/><line y2="31"/><line x2="791" y1="31" y2="31"/><line x1="791" x2="791" y2="31"/><line x1="766" x2="766" y2="3"/><line x1="766" x2="766" y1="31" y2="28"/><line x1="742" x2="742" y2="3"/><line x1="742" x2="742" y1="31" y2="28"/><line x1="717" x2="717" y2="3"/><line x1="717" x2="717" y1="31" y2="28"/><line x1="692" x2="692" y2="3"/><line x1="692" x2="692" y1="31" y2="28"/><line x1="667" x2="667" y2="3"/><line x1="667" x2="667" y1="31" y2="28"/><line x1="643" x2="643" y2="3"/><line x1="643" x2="643" y1="31" y2="28"/><line x1="618" x2="618" y2="3"/><line x1="618" x2="618" y1="31" y2="28"/><line x1="593" x2="593" y2="3"/><line x1="593" x2="593" y1="31" y2="28"/><line x1="569" x2="569" y2="3"/><line x1="569" x2="569" y1="31" y2="28"/><line x1="544" x2="544" y2="3"/><line x1="544" x2="544" y1="31" y2="28"/><line x1="519" x2="519" y2="3"/><line x1="519" x2="519" y1="31" y2="28"/><line x1="494" x2="494" y2="3"/><line x1="494" x2="494" y1="31" y2="28"/><line x1="470" x2="470" y2="3"/><line x1="470" x2="470" y1="31" y2="28"/><line x1="445" x2="445" y2="3"/><line x1="445" x2="445" y1="31" y2="28"/><line x1="420" x2="420" y2="3"/><line x1="420" x2="420" y1="31" y2="28"/><line x1="396" x2="396" y2="31"/><line x1="371" x2="371" y2="3"/><line x1="371" x2="371" y1="31" y2="28"/><line x1="346" x2="346" y2="3"/><line x1="346" x2="346" y1="31" y2="28"/><line x1="321" x2="321" y2="3"/><line x1="321" x2="321" y1="31" y2="28"/><line x1="297" x2="297" y2="3"/><line x1="297" x2="297" y1="31" y2="28"/><line x1="272" x2="272" y2="3"/><line x1="272" x2="272" y1="31" y2="28"/><line x1="247" x2="247" y2="3"/><line x1="247" x2="247" y1="31" y2="28"/><line x1="222" x2="222" y2="3"/><line x1="222" x2="222" y1="31" y2="28"/><line x1="198" x2="198" y2="3"/><line x1="198" x2="198" y1="31" y2="28"/><line x1="173" x2="173" y2="3"/><line x1="173" x2="173" y1="31" y2="28"/><line x1="148" x2="148" y2="3"/><line x1="148" x2="148" y1="31" y2="28"/><line x1="124" x2="124" y2="3"/><line x1="124" x2="124" y1="31" y2="28"/><line x1="99" x2="99" y2="3"/><line x1="99" x2="99" y1="31" y2="28"/><line x1="74" x2="74" y2="3"/><line x1="74" x2="74" y1="31" y2="28"/><line x1="49" x2="49" y2="3"/><line x1="49" x2="49" y1="31" y2="28"/><line x1="25" x2="25" y2="3"/><line x1="25" x2="25" y1="31" y2="28"/></g><g><g><rect x="396" width="396" height="31" field="wLength" style="fill-opacity:0.1;fill:#006aff"/><rect width="396" height="31" field="wIndex" style="fill-opacity:0.1;fill:#ffbf00"/></g><g transform="translate(12,-11)"><g transform="translate(766)"><text y="6">0</text></g><g transform="translate(396)"><text y="6">15</text></g><g transform="translate(371)"><text y="6">16</text></g><g transform="translate(0)"><text y="6">31</text></g></g><g transform="translate(12,15)"><g transform="translate(581)"><text y="6"><tspan>wLength</tspan></text></g><g transform="translate(185)"><text y="6"><tspan>wIndex</tspan></text></g></g><g transform="translate(12,39)"><g><g transform="translate(581)"><text y="6"><tspan>Number of bytes to transfer in DATA step</tspan></text></g></g><g><g transform="translate(185)"><text y="6"><tspan>Index of offset</tspan></text></g></g></g></g></g><g transform="translate(4,21)"><g stroke="black" stroke-width="1" stroke-linecap="round"><line x2="791"/><line y2="31"/><line x2="791" y1="31" y2="31"/><line x1="791" x2="791" y2="31"/><line x1="766" x2="766" y2="3"/><line x1="766" x2="766" y1="31" y2="28"/><line x1="742" x2="742" y2="3"/><line x1="742" x2="742" y1="31" y2="28"/><line x1="717" x2="717" y2="3"/><line x1="717" x2="717" y1="31" y2="28"/><line x1="692" x2="692" y2="3"/><line x1="692" x2="692" y1="31" y2="28"/><line x1="667" x2="667" y2="3"/><line x1="667" x2="667" y1="31" y2="28"/><line x1="643" x2="643" y2="3"/><line x1="643" x2="643" y1="31" y2="28"/><line x1="618" x2="618" y2="3"/><line x1="618" x2="618" y1="31" y2="28"/><line x1="593" x2="593" y2="3"/><line x1="593" x2="593" y1="31" y2="28"/><line x1="569" x2="569" y2="3"/><line x1="569" x2="569" y1="31" y2="28"/><line x1="544" x2="544" y2="3"/><line x1="544" x2="544" y1="31" y2="28"/><line x1="519" x2="519" y2="3"/><line x1="519" x2="519" y1="31" y2="28"/><line x1="494" x2="494" y2="3"/><line x1="494" x2="494" y1="31" y2="28"/><line x1="470" x2="470" y2="3"/><line x1="470" x2="470" y1="31" y2="28"/><line x1="445" x2="445" y2="3"/><line x1="445" x2="445" y1="31" y2="28"/><line x1="420" x2="420" y2="3"/><line x1="420" x2="420" y1="31" y2="28"/><line x1="396" x2="396" y2="31"/><line x1="371" x2="371" y2="3"/><line x1="371" x2="371" y1="31" y2="28"/><line x1="346" x2="346" y2="3"/><line x1="346" x2="346" y1="31" y2="28"/><line x1="321" x2="321" y2="3"/><line x1="321" x2="321" y1="31" y2="28"/><line x1="297" x2="297" y2="3"/><line x1="297" x2="297" y1="31" y2="28"/><line x1="272" x2="272" y2="3"/><line x1="272" x2="272" y1="31" y2="28"/><line x1="247" x2="247" y2="3"/><line x1="247" x2="247" y1="31" y2="28"/><line x1="222" x2="222" y2="3"/><line x1="222" x2="222" y1="31" y2="28"/><line x1="198" x2="198" y2="31"/><line x1="173" x2="173" y2="3"/><line x1="173" x2="173" y1="31" y2="28"/><line x1="148" x2="148" y2="3"/><line x1="148" x2="148" y1="31" y2="28"/><line x1="124" x2="124" y2="3"/><line x1="124" x2="124" y1="31" y2="28"/><line x1="99" x2="99" y2="3"/><line x1="99" x2="99" y1="31" y2="28"/><line x1="74" x2="74" y2="3"/><line x1="74" x2="74" y1="31" y2="28"/><line x1="49" x2="49" y2="3"/><line x1="49" x2="49" y1="31" y2="28"/><line x1="25" x2="25" y2="3"/><line x1="25" x2="25" y1="31" y2="28"/></g><g><g><rect x="396" width="396" height="31" field="wValue" style="fill-opacity:0.1;fill:#ffbf00"/><rect x="198" width="198" height="31" field="bRequest" style="fill-opacity:0.1;fill:#aaff00"/><rect width="198" height="31" field="bmRequestType" style="fill-opacity:0.1;fill:#aaff00"/></g><g transform="translate(12,-11)"><g transform="translate(766)"><text y="6">32</text></g><g transform="translate(396)"><text y="6">47</text></g><g transform="translate(371)"><text y="6">48</text></g><g transform="translate(198)"><text y="6">55</text></g><g transform="translate(173)"><text y="6">56</text></g><g transform="translate(0)"><text y="6">63</text></g></g><g transform="translate(12,15)"><g transform="translate(581)"><text y="6"><tspan>wValue</tspan></text></g><g transform="translate(284)"><text y="6"><tspan>bRequest</tspan></text></g><g transform="translate(87)"><text y="6"><tspan>bmRequestType</tspan></text></g></g><g transform="translate(12,39)"><g><g transform="translate(581)"><text y="6"><tspan>Value</tspan></text></g></g><g><g transform="translate(284)"><text y="6"><tspan>Specific to request</tspan></text></g></g></g></g></g></g></svg>
\ No newline at end of file