chrome-ec/test/usb_test
Bill Richardson 20f5efafc8 Cr50: Support USB SETCFG/GETCFG control transfers
This adds USB support to Set and Get the Device Configuration.
These control transfers are standard device requests that need to
be added in order to behave properly for USB suspend/resume (and
in general). Before this CL, the Get command always failed and
the Set command had no effect internally. With this CL it works.

Note that this particular change only supports ONE configuration
for the Cr50. If/when we add additional configuration
descriptors, we'll need to update it again.

BUG=chrome-os-partner:50721
BRANCH=none
TEST=make buildall; manual tests on Cr50

This CL includes a test program. Connect the Cr50 to the build
host, and use that program to read and change the configuration.

  cd test/usb_test
  make
  ./device_configuration
  ./device_configuration 0
  ./device_configuration 1
  ./device_configuration 2

You may need to use sudo if your device permissions aren't sufficient.

Change-Id: Id65e70265f0760b1b374005dfcddc88e66a933f6
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/335878
Reviewed-by: Scott Collyer <scollyer@chromium.org>
2016-03-30 17:10:17 -07:00
..
Makefile Cr50: Support USB SETCFG/GETCFG control transfers 2016-03-30 17:10:17 -07:00
README Cr50: Support USB SETCFG/GETCFG control transfers 2016-03-30 17:10:17 -07:00
device_configuration.c Cr50: Support USB SETCFG/GETCFG control transfers 2016-03-30 17:10:17 -07:00

README

These tests need to be built and run by hand, unless/until we set up a lab
with known devices attached to a test host.