Disconnect() In the disconnect function, it is also important to retrieve from the interface any data that was previously set with a call to usb_set_intfdata. Then set the data pointer in the struct usb_interface structure to NULL to prevent any … Continue reading
probe function In the probe function the USB driver should initialize any local structures that it might use to manage the USB device. It should also save any information that it needs about the device to the local structure, as … Continue reading
A Device Descriptor describes general information about a USB device. It includes information that applies globally to the device and all of the device’s configurations. A USB device has only one device descriptor.
Types of transfer Control Transfers Interrupt Transfers Isochronous Transfers Bulk Transfer Control transfer Control transfers are typically used for command and status operations. They are essential to set up a USB device with all enumeration functions being performed using control … Continue reading
Endpoints Endpoints can be described as sources or sinks of data. As the bus is host centric, endpoints occur at the end of the communications channel at the USB function. At the software layer, your device driver may send a … Continue reading
All devices have an upstream connection to the host and all hosts have a downstream connection to the device. Upstream and downstream connectors are not mechanically interchangeable, thus eliminating illegal loopback connections at hubs such as a downstream port connected … Continue reading
struct net_device *alloc_netdev(int sizeof_priv, const char *name, void (*setup)(structnet_device *)); Here, sizeof_priv is the size of the driver’s “private data” area; with network devices, that area is allocated along with the net_device structure. In fact, the two are allocated together … Continue reading
struct net_device *alloc_etherdev(int sizeof_priv); This function allocates a network device using eth%d for the name argument. It provides its own initialization function (ether_setup) that sets several net_device fields with appropriate values for Ethernet devices.
struct sk_buff Designed to easily support encapsulation/decapsulation of data through the protocol layers. In addition to the data itself, an sk_buff maintains head : the start of the packet data : the start of the packet payload tail : the … Continue reading
int socket(int domain, int type, int protocol); The socket created is one end point of a communication channel. The domain parameter specifies the address family, the type parameter specifies the type of communication to be used with this socket, and … Continue reading
In sockets five main functions that r used are: socket() , bind(), listen(), accept() and close()
After a driver has requested the range of I/O ports it needs to use in its activities, it must read and/or write to those ports. To this end, most hardware differentiates between 8-bit, 16-bit, and 32- bit ports.
To use parallel port we need to allocate region using following function struct resource *request_region(unsigned long first, unsigned long n, const char *name); We can also check whether region available or not by this function int check_region(unsigned long first, unsigned … Continue reading
To test parallel port we can do the following step: Create a node by mknod /dev/parlelport c 61 0 The module can now be installed, parlelport. You can check that it is effectively reserving the input/output port addresses 0×378 with … Continue reading
The Memory management unit consists of Segmentation unit and Paging unit. Segmentation unit allows the use of two address components, viz. segment and offset for relocability and sharing of code and data. •Segmentation unit allows segments of size 4Gbytes at … Continue reading