What is a USB stick?

I want to know what is meant by a USB stack and an example of this. I learned a lot about USB information, and I read a few books, such as USB, in a nutshell, but the “USB drive” was not mentioned.

+6
source share
2 answers

The term “stack” refers to an abstract data structure (not related to this) or to a set of software that performs a specific function. In the case of the "USB-stack" is a set of hardware, firmware, kernel modules, drivers and user programs that allow communication via USB.

The term “stack” is used because software components often overlap each other, one above the other, using services of a level (s) below it.

You may also hear about a "network stack" or a "LAMP stack" or other similar phrases. Wikipedia has an article on the solution stack , which is the same idea.

+8
source

A USB stack is just a phrase based on the general concept of a “software stack,” such as a TCP / IP stack, a GSM stack, etc.

This is a structure often provided by USB device manufacturers or OS developers that allows other developers to focus on the meat of their implementation, rather than worrying about using the lower level of USB properly.

In the case of USB, there are essentially communication layers (each calls them a little differently):

  • Link Layer (Serial IO) - refers to the differential transitions of lines and signaling and decodes the stream into binary data, very often in hardware
  • USB Packet Layer - refers to the structure of USB data packets.
  • Required USB function - enumeration, buffers, endpoints
  • The higher-level USB APIs are Audio, HID, etc., which have their own limitations and needs.

It looks like the TCP / IP stack of a modern operating system:

  • Physical layer (usually performed on equipment on an Ethernet card)
  • Link Level (MAC address level often performed on hardware on an Ethernet card)
  • Network layer (IP, routing)
  • Transport Layer (TCP)
  • Levels specific to your application (HTTP stack, etc.).
+6
source

Source: https://habr.com/ru/post/907607/


All Articles