LINUX USB API
•Rohit Kr Prasad
200301085
•Utkarsh Singh
200301135
•Utkarsh Prateek
200301183
COMMUNICATING WITH
PERIPHERALS
Serial port
Parallel port
Universal Serial Bus (USB)
Universal Serial Bus (USB)
Fast
Bi-directional
Isochronous
Low-cost
Dynamically attachable
USB2.0 promises a transfer rate of 120-
240Mbps
Allows upto 127 devices to be connected
Can provide upto 500mA for devices.
USB interaction with LINUX
Linux tries to make application simpler by
providing a common hardware abstraction,
i.e. File.
Device can now be treated as a file and
worked upon.
One can "Open" , "Read" from, "Write" to
and "Close" a driver & can use the same
system calls to open and manipulate files
to talk to hardware.
How it works?
Linux kernel creates nodes in the
filesystem, typically in the /dev/ directory.
To talk to a particular driver, an application
will open the /dev entry associated with it.
The file descriptor returned can then be
passed to all future system calls till a close
is called.
Applications don't call the driver functions
directly.
评论0