USB peripheral devices consist of one or more physical components that implement the abilities of the devices. These components are called interfaces. Each interface typically provides some useful grouping of functionality, but exactly what constitutes an interface is an implementation detail. For example, a USB mouse device could present one interface for horizontal and vertical movement information and a separate interface for left and right button information. As another option, the device could present a single interface containing all the information. Both are valid approaches, but each approach has implications for how the device driver must operate.
Associated with each interface is a set of endpoints. Endpoints are the ultimate producers or consumers of data transmitted across the bus. All USB devices have a special endpoint, known as endpoint 0, which supports the generic USB status and configuration protocol.
USB device drivers establish logical communication channels, called pipes, to the various endpoints on a USB device. A pipe is a software association between a USB device driver and an endpoint. Pipes can be thought of as communication channels that use function calls to the USB system software to communicate with their associated endpoints. The characteristics of a pipe, such as the direction of communication and the required bandwidth, are determined by the endpoint characteristics, which in turn are indicated in the endpoint descriptor structure.
The bus interface hardware on a USB device is responsible for the transmission and the reception of USB-structured data. The logical USB device corresponding to a physical USB device consists of USB abstraction entities, such as the device endpoints and their corresponding pipes.