Changeset e3c78efc in mainline


Ignore:
Timestamp:
2011-11-09T12:59:37Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6f730278
Parents:
555499da
Message:

usbhid: Remove redundant array size enums.

Location:
uspace/drv/bus/usb/usbhid
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/kbd/kbddev.c

    r555499da re3c78efc  
    102102static void usb_kbd_set_led(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev);
    103103/*----------------------------------------------------------------------------*/
    104 enum {
    105         USB_KBD_BOOT_REPORT_DESCRIPTOR_SIZE = 63
    106 };
    107 
    108 static const uint8_t USB_KBD_BOOT_REPORT_DESCRIPTOR[
    109     USB_KBD_BOOT_REPORT_DESCRIPTOR_SIZE] = {
     104static const uint8_t USB_KBD_BOOT_REPORT_DESCRIPTOR[] = {
    110105        0x05, 0x01,  // Usage Page (Generic Desktop),
    111106        0x09, 0x06,  // Usage (Keyboard),
    112107        0xA1, 0x01,  // Collection (Application),
    113108        0x75, 0x01,  //   Report Size (1),
    114         0x95, 0x08,  //   Report Count (8),       
     109        0x95, 0x08,  //   Report Count (8),
    115110        0x05, 0x07,  //   Usage Page (Key Codes);
    116111        0x19, 0xE0,  //   Usage Minimum (224),
     
    796791        int rc = usb_hid_parse_report_descriptor(
    797792            &hid_dev->report, USB_KBD_BOOT_REPORT_DESCRIPTOR,
    798             USB_KBD_BOOT_REPORT_DESCRIPTOR_SIZE);
     793            sizeof(USB_KBD_BOOT_REPORT_DESCRIPTOR));
    799794
    800795        if (rc != EOK) {
  • uspace/drv/bus/usb/usbhid/mouse/mousedev.c

    r555499da re3c78efc  
    7777
    7878/*----------------------------------------------------------------------------*/
    79 
    80 enum {
    81         USB_MOUSE_BOOT_REPORT_DESCRIPTOR_SIZE = 63
    82 };
    83 
    84 static const uint8_t USB_MOUSE_BOOT_REPORT_DESCRIPTOR[
    85     USB_MOUSE_BOOT_REPORT_DESCRIPTOR_SIZE] = {
     79static const uint8_t USB_MOUSE_BOOT_REPORT_DESCRIPTOR[] = {
    8680        0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    8781        0x09, 0x02,                    // USAGE (Mouse)
     
    540534        int rc = usb_hid_parse_report_descriptor(
    541535            &hid_dev->report, USB_MOUSE_BOOT_REPORT_DESCRIPTOR,
    542             USB_MOUSE_BOOT_REPORT_DESCRIPTOR_SIZE);
     536            sizeof(USB_MOUSE_BOOT_REPORT_DESCRIPTOR));
    543537
    544538        if (rc != EOK) {
  • uspace/drv/bus/usb/usbhid/usbhid.c

    r555499da re3c78efc  
    301301        assert(dev);
    302302
    303 
    304303        if (dev->pipes[USB_HID_KBD_POLL_EP_NO].present) {
    305304                usb_log_debug("Found keyboard endpoint.\n");
Note: See TracChangeset for help on using the changeset viewer.