Re: Simple USB raw data drivers or APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 14, 2010 at 02:21:55PM -0800, Ron Madrid wrote:
> Hello all,
> 
> I am working with a custom MPC8313 based board running
> linux and want to have USB communication between my board
> and a host machine.  I would like to make a few
> statements and find out if my assumptions are correct.
> 
> 1.  I need to write a gadget driver for my board.

Yes, if the existing ones do not work with your hardware.

> 2.  I need to write a device driver for my host
> machine.

That depends on the type of usb device you wish your device to be.
If you pick a "class" device, then no, you will not, as the host driver
will already be written (usb storage is an example of this.)

> 3.  I need to write application programs that open
> each (respective) driver in order to define the
> communication between each device.

No, it depends on what type of USB device you create.  If it's a storage
device, you access it through the "normal" file apis on the host
computer.

> Basically, what I want to be able to do is access data from
> my board and send it back to my host machine via USB, in a
> similar fashion as send() recv() in socket
> programming.  Does there already exist any drivers that
> implement a generic raw data transfer capability that can be
> interfaced in this manner?

Yes, the ethernet gadget device, or the serial one should work.

> I do already know about the ethernet over usb drivers and
> have tried them in the past.  I want something more
> direct and with less overhead.

Why do you feel the ethernet gadget has too much overhead?

Have you tried the serial one?

good luck,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux