cr50: cleanup a few strings & messages

Add a description for the USB HID interface, neaten a bit of
console output. No new functionality.

BUG=none
BRANCH=none
TEST=make buildall

Change-Id: Ie85a0192bc4ab9fa87afb4be41d496545a3b548a
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/283051
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Bill Richardson
2015-07-01 10:15:52 -07:00
committed by ChromeOS Commit Bot
parent 1f941e8674
commit 662ed79092
4 changed files with 6 additions and 3 deletions

View File

@@ -88,6 +88,7 @@ const void * const usb_strings[] = {
[USB_STR_VERSION] = USB_STRING_DESC(CROS_EC_VERSION32),
[USB_STR_CONSOLE_NAME] = USB_STRING_DESC("Shell"),
[USB_STR_BLOB_NAME] = USB_STRING_DESC("Blob"),
[USB_STR_HID_NAME] = USB_STRING_DESC("PokeyPokey"),
};
BUILD_ASSERT(ARRAY_SIZE(usb_strings) == USB_STR_COUNT);
#endif

View File

@@ -53,6 +53,7 @@ enum usb_strings {
USB_STR_VERSION,
USB_STR_CONSOLE_NAME,
USB_STR_BLOB_NAME,
USB_STR_HID_NAME,
USB_STR_COUNT
};

View File

@@ -37,6 +37,7 @@
#endif
/* Console output macro */
#define CPRINTS(format, args...) cprints(CC_USB, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_USB, format, ## args)
#ifdef CONFIG_USB_BOS
@@ -249,7 +250,7 @@ static void ep0_tx(void)
if (set_addr) {
GR_USB_DCFG = (GR_USB_DCFG & ~DCFG_DEVADDR(0x7f))
| DCFG_DEVADDR(set_addr);
CPRINTF("SETAD %02x\n", set_addr);
CPRINTS("SETAD 0x%02x (%d)", set_addr, set_addr);
set_addr = 0;
}
if (desc_ptr) {
@@ -445,7 +446,7 @@ void usb_init(void)
usb_connect();
#endif
CPRINTF("USB init done\n");
CPRINTS("USB init done");
}
#ifndef CONFIG_USB_INHIBIT_INIT
DECLARE_HOOK(HOOK_INIT, usb_init, HOOK_PRIO_DEFAULT);

View File

@@ -33,7 +33,7 @@ const struct usb_interface_descriptor USB_IFACE_DESC(USB_IFACE_HID) =
.bInterfaceClass = USB_CLASS_HID,
.bInterfaceSubClass = USB_HID_SUBCLASS_BOOT,
.bInterfaceProtocol = USB_HID_PROTOCOL_KEYBOARD,
.iInterface = 0,
.iInterface = USB_STR_HID_NAME,
};
const struct usb_endpoint_descriptor USB_EP_DESC(USB_IFACE_HID, 81) =
{