Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2020 01:53:21 +0000
From:      "Wall, Stephen" <stephen.wall@redcom.com>
To:        "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org>
Subject:   Sending data packets to USB bulk endpoint
Message-ID:  <14d06ca2f98e42eca84e9b0d0df8b39e@redcom.com>

next in thread | raw e-mail | index | archive | help
I posted this on the FreeBSD Drivers forum, got no response, so I'm trying =
here.

I am working on a driver to support a Silicon Labs I2S to USB bridge. Besid=
es the audio portion, the chip supports a bulk endpoint which uses a docume=
nted packet format to read & control 16 GPIO pins, and to pass messages to =
& from an I2C bus. I have not previously worked with USB, or FreeBSD driver=
s. I'm been handed a partially complete codebase - the audio stream works -=
 and I'm trying to get the GPIO controls working. My intent is to use ioctl=
() calls to read and set the pins.

Creating an entry in /dev and the associated character device structure for=
 the GPIO control is pretty straightforward. Where I'm getting stuck is try=
ing to figure out how to get the messages I am creating in the driver down =
to the bulk endpoint - the USB driver code is a bit overwhelming to a newco=
mer, and I can't seem to find a function that fits "send this block of data=
 to this endpoint". The only way I've seen for interacting with bulk endpoi=
nts is to write a driver based on usb_fifo_methods rather than cdevsw (per =
"FreeBSD Device Drivers", chapter 15), which does not seem to fit what I'm =
trying to do.

I would appreciate any pointers experienced driver developers could give me=
 to get where I'm trying to go with this - either the name of the function =
I'm looking for, or some other was to get that functionality.

Thanks.

- Steve

--
Stephen Wall
Senior Staff Software Engineer
585.924.7550
[https://www.redcom.com/images/email/REDCOM-Logo.png]
REDCOM Laboratories, Inc.
One Redcom Center
Victor, NY 14564-0995
www.redcom.com<https://www.redcom.com/>;

DUNS 09-166-5919 | CAGE 1U548
Woman Owned Small Business




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14d06ca2f98e42eca84e9b0d0df8b39e>