Changes in / [682b697:5d4eb2df] in mainline
- Location:
- uspace
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/virtusbkbd/virtusbkbd.c
r682b697 r5d4eb2df 223 223 224 224 printf("%s: Simulating keyboard events...\n", NAME); 225 while(1){ 226 kb_process_events(&status, keyboard_events, keyboard_events_count, 227 on_keyboard_change); 228 } 225 kb_process_events(&status, keyboard_events, keyboard_events_count, 226 on_keyboard_change); 229 227 230 228 printf("%s: Terminating...\n", NAME); -
uspace/drv/usbhub/main.c
r682b697 r5d4eb2df 50 50 while(true){ 51 51 usb_hub_check_hub_changes(); 52 async_usleep(10000 000);52 async_usleep(10000); 53 53 } 54 54 return 0; -
uspace/drv/usbhub/utils.c
r682b697 r5d4eb2df 352 352 result->port_count = descriptor->ports_count; 353 353 result->attached_devs = (usb_hub_attached_device_t*) 354 malloc( (result->port_count+1)* sizeof(usb_hub_attached_device_t));354 malloc(result->port_count * sizeof(usb_hub_attached_device_t)); 355 355 int i; 356 for(i=0;i<result->port_count +1;++i){356 for(i=0;i<result->port_count;++i){ 357 357 result->attached_devs[i].devman_handle=0; 358 358 result->attached_devs[i].address=0; … … 428 428 429 429 430 for (port = 1; port < hub_info->port_count+1; ++port) {430 for (port = 0; port < hub_info->port_count; ++port) { 431 431 usb_hub_set_power_port_request(&request, port); 432 432 opResult = usb_drv_sync_control_write(hc, target, &request, NULL, 0); 433 printf("[usb_hub] powering port %d\n",port);434 433 if (opResult != EOK) { 435 434 printf("[usb_hub]something went wrong when setting hub`s %dth port\n", port); … … 541 540 return; 542 541 } 543 printf("[usb_hub] new device address %d, handle %d\n",544 new_device_address, child_handle);545 sleep(60);546 542 547 543 } … … 642 638 usb_port_set_dev_connected(&status, false); 643 639 if (status) { 644 printf("[usb_hub]there was some unsupported change on port %d\n",port);640 printf("[usb_hub]there was some unsupported change on port\n"); 645 641 } 646 642 /// \TODO handle other changes … … 679 675 target.address = hub_info->usb_device->address; 680 676 target.endpoint = 1;/// \TODO get from endpoint descriptor 681 printf("checking changes for hub at addr %d \n",target.address);682 677 683 678 size_t port_count = hub_info->port_count; … … 692 687 693 688 // FIXME: count properly 694 size_t byte_length = ( (port_count+1)/ 8) + 1;689 size_t byte_length = (port_count / 8) + 1; 695 690 696 691 void *change_bitmap = malloc(byte_length); … … 712 707 } 713 708 unsigned int port; 714 for (port = 1; port < port_count+1; ++port) {709 for (port = 0; port < port_count; ++port) { 715 710 bool interrupt = (((uint8_t*) change_bitmap)[port / 8] >> (port % 8)) % 2; 716 711 if (interrupt) { -
uspace/drv/vhc/devices.c
r682b697 r5d4eb2df 147 147 if (virthub_dev.address == transaction->target.address) { 148 148 size_t tmp; 149 dprintf( 1, "sending `%s' transaction to hub",149 dprintf(3, "sending `%s' transaction to hub", 150 150 usbvirt_str_transaction_type(transaction->type)); 151 151 switch (transaction->type) { -
uspace/drv/vhc/hubops.c
r682b697 r5d4eb2df 200 200 } \ 201 201 } while (false); \ 202 hub_port_t *portvar = &hub_dev.ports[index -1]202 hub_port_t *portvar = &hub_dev.ports[index] 203 203 204 204 -
uspace/lib/usb/src/addrkeep.c
r682b697 r5d4eb2df 199 199 usb_address_keeping_used_t *last 200 200 = used_address_get_instance(addresses->used_addresses.next); 201 free_address = last->address + 1;201 free_address = last->address; 202 202 } 203 203 }
Note:
See TracChangeset
for help on using the changeset viewer.