Changeset 3bacee1 in mainline for uspace/app/vuhid


Ignore:
Timestamp:
2018-04-12T16:27:17Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3cf22f9
Parents:
76d0981d
git-author:
Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
Message:

Make ccheck-fix again and commit more good files.

Location:
uspace/app/vuhid
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/vuhid/device.c

    r76d0981d r3bacee1  
    129129
    130130        /* Check that we have not run out of available endpoints. */
    131         if ((iface->in_data_size > 0)
    132             && (hid_data->in_endpoint_first_free >= VUHID_ENDPOINT_MAX)) {
     131        if ((iface->in_data_size > 0) &&
     132            (hid_data->in_endpoint_first_free >= VUHID_ENDPOINT_MAX)) {
    133133                return ELIMIT;
    134134        }
    135         if ((iface->out_data_size > 0)
    136             && (hid_data->out_endpoint_first_free >= VUHID_ENDPOINT_MAX)) {
     135        if ((iface->out_data_size > 0) &&
     136            (hid_data->out_endpoint_first_free >= VUHID_ENDPOINT_MAX)) {
    137137                return ELIMIT;
    138138        }
     
    192192        descr_iface->length = sizeof(usb_standard_interface_descriptor_t);
    193193        descr_iface->descriptor_type = USB_DESCTYPE_INTERFACE;
    194         descr_iface->interface_number
    195             = dev->descriptors->configuration->descriptor->interface_count;
     194        descr_iface->interface_number =
     195            dev->descriptors->configuration->descriptor->interface_count;
    196196        descr_iface->alternate_setting = 0;
    197197        descr_iface->endpoint_count = ep_count;
     
    230230                descr_ep_in->length = sizeof(usb_standard_endpoint_descriptor_t);
    231231                descr_ep_in->descriptor_type = USB_DESCTYPE_ENDPOINT;
    232                 descr_ep_in->endpoint_address
    233                     = 0x80 | hid_data->in_endpoint_first_free;
     232                descr_ep_in->endpoint_address =
     233                    0x80 | hid_data->in_endpoint_first_free;
    234234                descr_ep_in->attributes = 3;
    235235                descr_ep_in->max_packet_size = iface->in_data_size;
     
    246246                descr_ep_out->length = sizeof(usb_standard_endpoint_descriptor_t);
    247247                descr_ep_out->descriptor_type = USB_DESCTYPE_ENDPOINT;
    248                 descr_ep_out->endpoint_address
    249                     = 0x00 | hid_data->out_endpoint_first_free;
     248                descr_ep_out->endpoint_address =
     249                    0x00 | hid_data->out_endpoint_first_free;
    250250                descr_ep_out->attributes = 3;
    251251                descr_ep_out->max_packet_size = iface->out_data_size;
     
    256256        usbvirt_device_configuration_extras_t *extra_descriptors;
    257257        extra_descriptors = realloc(dev->descriptors->configuration->extra,
    258             sizeof(usbvirt_device_configuration_extras_t)
    259             * (dev->descriptors->configuration->extra_count + descr_count));
     258            sizeof(usbvirt_device_configuration_extras_t) *
     259            (dev->descriptors->configuration->extra_count + descr_count));
    260260        if (extra_descriptors == NULL) {
    261261                rc = ENOMEM;
     
    300300         */
    301301        if (iface->in_data_size > 0) {
    302                 hid_data->in_endpoints_mapping[hid_data->in_endpoint_first_free]
    303                     = iface;
    304                 dev->ops->data_in[hid_data->in_endpoint_first_free]
    305                     = on_data_from_device;
     302                hid_data->in_endpoints_mapping[hid_data->in_endpoint_first_free] =
     303                    iface;
     304                dev->ops->data_in[hid_data->in_endpoint_first_free] =
     305                    on_data_from_device;
    306306                hid_data->in_endpoint_first_free++;
    307307        }
    308308        if (iface->out_data_size > 0) {
    309                 hid_data->out_endpoints_mapping[hid_data->out_endpoint_first_free]
    310                     = iface;
    311                 dev->ops->data_out[hid_data->out_endpoint_first_free]
    312                     = on_data_to_device;
     309                hid_data->out_endpoints_mapping[hid_data->out_endpoint_first_free] =
     310                    iface;
     311                dev->ops->data_out[hid_data->out_endpoint_first_free] =
     312                    on_data_to_device;
    313313                hid_data->out_endpoint_first_free++;
    314314        }
    315315
    316         hid_data->interface_mapping[
    317             dev->descriptors->configuration->descriptor->interface_count]
    318             = iface;
     316        hid_data->interface_mapping[dev->descriptors->configuration->descriptor->interface_count] =
     317            iface;
    319318
    320319        dev->descriptors->configuration->descriptor->interface_count++;
    321         dev->descriptors->configuration->descriptor->total_length
    322             += total_descr_size;
     320        dev->descriptors->configuration->descriptor->total_length +=
     321            total_descr_size;
    323322
    324323        hid_data->iface_count++;
  • uspace/app/vuhid/stdreq.c

    r76d0981d r3bacee1  
    5050
    5151        if (setup_packet->value_high == USB_DESCTYPE_HID_REPORT) {
    52                 vuhid_interface_t *iface
    53                     = vuhid->interface_mapping[setup_packet->index];
     52                vuhid_interface_t *iface =
     53                    vuhid->interface_mapping[setup_packet->index];
    5454                if (iface == NULL) {
    5555                        return EFORWARD;
Note: See TracChangeset for help on using the changeset viewer.