EmbLogic's Blog

USB Function

When we think of a USB device, we think of a USB peripheral, but a USB device could mean a USB transceiver device used at the host or peripheral, a USB Hub or Host Controller IC device, or a USB peripheral device. The standard therefore makes references to USB functions which can be seen as USB devices which provide a capability or function such as a Printer, Zip Drive, Scanner, Modem or other peripheral.

Posted in Uncategorized | Leave a comment

usb Driver

Types of 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 transfers. They are typically bursty, random packets which are initiated by the host and use best effort delivery. The packet length of control transfers in low speed devices must be 8 bytes, high speed devices allow a packet size of 8, 16, 32 or 64 bytes and full speed devices must have a packet size of 64 bytes.

Posted in Uncategorized | Leave a comment

Usb driver

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 packet to your devices EP1 for example. As the data is flowing out from the host, it will end up in the EP1 OUT buffer. Your firmware will then at its leisure read this data. If it wants to return data, the function cannot simply write to the bus as the bus is controlled by the host. Therefore it writes data to EP1 IN which sits in the buffer until such time when the host sends a IN packet to that endpoint requesting the data. Endpoints can also be seen as the interface between the hardware of the function device and the firmware running on the function device.

All devices must support endpoint zero. This is the endpoint which receives all of the devices control and status requests during enumeration and throughout the duration while the device is operational on the bus.

Posted in Uncategorized | Leave a comment

USB

Unlike RS-232 and similar serial interfaces where the format of data being sent is not defined, USB is made up of several layers of protocols. Once you understand what is going on, you really only have to worry about the higher level layers. In fact most USB controller I.C.s will take care of the lower layer, thus making it almost invisible to the end designer.

Each USB transaction consists of a

    • Token Packet (Header defining what it expects to follow), an
    • Optional Data Packet, (Containing the payload) and a
    • Status Packet (Used to acknowledge transactions and to provide a means of error correction)
Posted in Uncategorized | Leave a comment

Progress Bar

van anybdy tell me …how to check the %age of running shell script…ie how much it is completed(so dat i cn show it by a progress bar)…this shell script is mainly used here to install a no of library packages…dat means v have to find out the %age of installation process….****comments are most welcome..*****

Posted in Uncategorized | Leave a comment

usb driver

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 to a downstream port. There are commonly two types of connectors, called type A and type B.

Type A plugs always face upstream. Type A sockets will typically find themselves on hosts and hubs. For example type A sockets are common on computer main boards and hubs. Type B plugs are always connected downstream and consequently type B sockets are found on devices.

Posted in Uncategorized | Leave a comment

Wait queue pointer

Wait queues are implemented as cyclical lists whose elements include pointers to process
descriptors. Each element of a wait queue list is of type wait_queue:
struct wait_queue {
struct task_struct * task;
struct wait_queue * next;
};
Each wait queue is identified by a wait queue pointer, which contains either the address of the first element of the list or the null pointer if the list is empty. The next field of the
wait_queue data structure points to the next element in the list, except for the last element,
whose next field points to a dummy list element.

Posted in Uncategorized | Leave a comment

Wait queue

Wait queues have several uses in the kernel, particularly for interrupt handling, process
synchronization, and timing. Wait queues implement conditional waits on events: a process wishing to wait for a specific event places itself in the proper wait queue and relinquishes control. Therefore, a wait queue represents a set of sleeping processes, which are awakened by the kernel when some condition becomes true.

Posted in Uncategorized | Leave a comment

network driver

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 in one large chunk of memory, but driver authors should pretend that they don’t know that. name is the name of this interface.

Posted in Uncategorized | Leave a comment

Original parent of process

p_opptr (original parent):-
Points to the process descriptor of the process that created P or to the descriptor of
process 1 (init) if the parent process no longer exists. Thus, when a shell user starts a
background process and exits the shell, the background process becomes the child of
init.

Posted in Uncategorized | Leave a comment

network driver

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.

Posted in Uncategorized | Leave a comment

Parenthood Relationships Among Processes

Processes created by a program have a parent/child relationship. Since a process can create
several children, these have sibling relationships. Several fields must be introduced in a
process descriptor to represent these relationships. Processe 0 and 1 are created by the kernel.process 1 (init) is the ancestor of all other processes.

Posted in Uncategorized | Leave a comment

USB

Unlike RS-232 and similar serial interfaces where the format of data being sent is not defined, USB is made up of several layers of protocols. While this sounds complicated, don’t give up now. Once you understand what is going on, you really only have to worry about the higher level layers. In fact most USB controller I.C.s will take care of the lower layer, thus making it almost invisible to the end designer.

Each USB transaction consists of a

    • Token Packet (Header defining what it expects to follow), an
    • Optional Data Packet, (Containing the payload) and a
    • Status Packet (Used to acknowledge transactions and to provide a means of error correction)

USB Protocols

Unlike RS-232 and similar serial interfaces where the format of data being sent is not defined, USB is made up of several layers of protocols. While this sounds complicated, don’t give up now. Once you understand what is going on, you really only have to worry about the higher level layers. In fact most USB controller I.C.s will take care of the lower layer, thus making it almost invisible to the end designer.

Each USB transaction consists of a

    • Token Packet (Header defining what it expects to follow), an
    • Optional Data Packet, (Containing the payload) and a
    • Status Packet (Used to acknowledge transactions and to provide a means of error correction)
Posted in Uncategorized | Leave a comment

network Driver

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 end of the packet payload
end : the end of the packet

Posted in Uncategorized | Leave a comment

Runqueues

The runqueue list groups together all processes in a TASK_RUNNING state. When it comes to
grouping processes in other states, the various states call for different types of treatment.

Processes in a TASK_STOPPED or in a TASK_ZOMBIE state are not linked in specific lists.
There is no need to group them, because either the process PID or the process
parenthood relationships may be used by the parent process to retrieve the child
process.

Posted in Uncategorized | Leave a comment