summaryrefslogtreecommitdiff
path: root/chip/g/usb_hw.h
Commit message (Collapse)AuthorAgeFilesLines
* Fixup usb_updater for reef/clangBrian Norris2016-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | clang doesn't like the array here: ec-utils-0.0.1-r3361: x86_64-cros-linux-gnu-clang -std=gnu99 -g -Wall -Werror -Wpointer-arith -Wcast-align -Wcast-qual -Wundef -Wsign-compare -Wredundant-decls -Wmissing-declarations -O0 -I/build/reef/usr/include/libusb-1.0 -I../../include -I../../board/cr50 -I ../../chip/g -I../../util usb_updater.c -lusb-1.0 -lcrypto -o usb_updater ec-utils-0.0.1-r3361: In file included from usb_updater.c:32: ec-utils-0.0.1-r3361: In file included from ../../include/usb_descriptor.h:14: ec-utils-0.0.1-r3361: ../../chip/g/usb_hw.h:29:14: error: tentative array definition assumed to have ec-utils-0.0.1-r3361: one element [-Werror] ec-utils-0.0.1-r3361: static int (*usb_iface_request[]) (struct usb_setup_packet *req); ec-utils-0.0.1-r3361: ^ ec-utils-0.0.1-r3361: 1 error generated. But it's willing to forgive if this is extern. It should be extern anyway. BRANCH=none BUG=chromium:658436 TEST=reef pre-cq passes (building ec-utils) Change-Id: I5b5f8eb8dcdc3340487b118b30469c8cee73e182 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/401421 Reviewed-by: Shawn N <shawnn@chromium.org>
* Cr50: Cleaner API for USB_DECLARE_IFACE callbacksBill Richardson2015-12-111-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | The control endpoint (EP0) can receive some Setup packets that are specific to individual Interfaces. The USB_DECLARE_IFACE macro is used to register the callbacks that an interface implementation provides to handle those Setup packets. This change cleans up the callback API a bit, so that we don't have to export the internal workings of the Cr50's EP0 interrupt handler. BUG=chrome-os-partner:34893 BRANCH=none TEST=make buildall, manual Connect the Cr50 to my workstation via USB: * /bin/dmesg reports no errors * verify EP0 with lsusb -v -d 18d1:5014 * verify EP1 with './extra/usb_console -e 1 -p 5014' (reverses case of input text) * verify EP2 with the 'hid' command on the EC console (types a 'g') Change-Id: I9ac22f6a74f360f201c58e9ef39e3576834578a8 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/317269 Reviewed-by: Dominic Rizzo <domrizzo@google.com>
* Cr50: USB hardware uses 8-bit buffers, not 16-bitBill Richardson2015-05-291-52/+3
| | | | | | | | | | | | | | | Our USB buffers are just arrays of uint8_t in program RAM, so let's treat them that way. The DMA descriptors are in normal RAM, too. BUG=chrome-os-partner:40693 BRANCH=none TEST=make buildall Change-Id: Ibafe1a557a328bbf8cf37ce113675fcd35bad376 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/273918 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* cleanup: Remove device-specific stuff from include/usb.hBill Richardson2015-05-281-0/+85
This moves the STM32-specific code out of the common header file and into the chip directory where it belongs. Note that this doesn't actually change the code for non-STM32 SoCs; that will happen in a separate CL for clarity. BUG=chrome-os-partner:40693 BRANCH=none TEST=make buildall Change-Id: Ifdf0086e86a1088fb011b9ac4d6c70ab8da47aec Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/273577 Reviewed-by: Randall Spangler <rspangler@chromium.org>