Ignore:
Timestamp:
2011-04-06T22:02:17Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4ca18ae
Parents:
8dc762e0
Message:

Switch to new endpoint toggle control.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/host/device_keeper.c

    r8dc762e0 rf567bcf  
    5656                instance->devices[i].control_used = 0;
    5757                instance->devices[i].handle = 0;
    58                 instance->devices[i].toggle_status[0] = 0;
    59                 instance->devices[i].toggle_status[1] = 0;
     58//              instance->devices[i].toggle_status[0] = 0;
     59//              instance->devices[i].toggle_status[1] = 0;
    6060                list_initialize(&instance->devices[i].endpoints);
    6161        }
     
    6363/*----------------------------------------------------------------------------*/
    6464void usb_device_keeper_add_ep(
    65     usb_device_keeper_t *instance, usb_address_t address, link_t *ep)
     65    usb_device_keeper_t *instance, usb_address_t address, endpoint_t *ep)
    6666{
    6767        assert(instance);
    6868        fibril_mutex_lock(&instance->guard);
    6969        assert(instance->devices[address].occupied);
    70         list_append(ep, &instance->devices[address].endpoints);
     70        list_append(&ep->same_device_eps, &instance->devices[address].endpoints);
    7171        fibril_mutex_unlock(&instance->guard);
    7272}
     
    131131                if (((data[0] & 0xf) == 1) && ((data[2] | data[3]) == 0)) {
    132132                        /* endpoint number is < 16, thus first byte is enough */
    133                         instance->devices[target.address].toggle_status[0] &=
    134                             ~(1 << data[4]);
    135                         instance->devices[target.address].toggle_status[1] &=
    136                             ~(1 << data[4]);
     133                        assert(!"NOT IMPLEMENTED!");
     134//                      instance->devices[target.address].toggle_status[0] &=
     135//                          ~(1 << data[4]);
     136//                      instance->devices[target.address].toggle_status[1] &=
     137//                          ~(1 << data[4]);
    137138                }
    138139        break;
     
    142143                /* target must be device */
    143144                if ((data[0] & 0xf) == 0) {
    144                         instance->devices[target.address].toggle_status[0] = 0;
    145                         instance->devices[target.address].toggle_status[1] = 0;
     145                        link_t *current =
     146                            instance->devices[target.address].endpoints.next;
     147                        while (current !=
     148                           instance->devices[target.address].endpoints.prev)
     149                        {
     150                                endpoint_toggle_reset(current);
     151                                current = current->next;
     152                        }
     153//                      instance->devices[target.address].toggle_status[0] = 0;
     154//                      instance->devices[target.address].toggle_status[1] = 0;
    146155                }
    147156        break;
     
    150159}
    151160/*----------------------------------------------------------------------------*/
     161#if 0
    152162/** Get current value of endpoint toggle.
    153163 *
     
    212222        return ret;
    213223}
     224#endif
    214225/*----------------------------------------------------------------------------*/
    215226/** Get a free USB address
Note: See TracChangeset for help on using the changeset viewer.