Changeset f567bcf in mainline for uspace/lib/usb/src/host/device_keeper.c
- Timestamp:
- 2011-04-06T22:02:17Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4ca18ae
- Parents:
- 8dc762e0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/host/device_keeper.c
r8dc762e0 rf567bcf 56 56 instance->devices[i].control_used = 0; 57 57 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; 60 60 list_initialize(&instance->devices[i].endpoints); 61 61 } … … 63 63 /*----------------------------------------------------------------------------*/ 64 64 void 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) 66 66 { 67 67 assert(instance); 68 68 fibril_mutex_lock(&instance->guard); 69 69 assert(instance->devices[address].occupied); 70 list_append( ep, &instance->devices[address].endpoints);70 list_append(&ep->same_device_eps, &instance->devices[address].endpoints); 71 71 fibril_mutex_unlock(&instance->guard); 72 72 } … … 131 131 if (((data[0] & 0xf) == 1) && ((data[2] | data[3]) == 0)) { 132 132 /* 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]); 137 138 } 138 139 break; … … 142 143 /* target must be device */ 143 144 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; 146 155 } 147 156 break; … … 150 159 } 151 160 /*----------------------------------------------------------------------------*/ 161 #if 0 152 162 /** Get current value of endpoint toggle. 153 163 * … … 212 222 return ret; 213 223 } 224 #endif 214 225 /*----------------------------------------------------------------------------*/ 215 226 /** Get a free USB address
Note:
See TracChangeset
for help on using the changeset viewer.