Changes in uspace/drv/usbhub/main.c [dff940f8:0f21c0c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/main.c
rdff940f8 r0f21c0c 31 31 */ 32 32 33 #include <d df/driver.h>33 #include <driver.h> 34 34 #include <errno.h> 35 35 #include <async.h> 36 #include <stdio.h>37 36 38 37 #include "usbhub.h" … … 52 51 }; 53 52 53 int usb_hub_control_loop(void * noparam){ 54 while(true){ 55 usb_hub_check_hub_changes(); 56 async_usleep(1000 * 1000 );/// \TODO proper number once 57 } 58 return 0; 59 } 60 61 54 62 int main(int argc, char *argv[]) 55 63 { 56 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 57 dprintf(USB_LOG_LEVEL_INFO, "starting hub driver"); 58 59 //this is probably not needed anymore 64 usb_log_enable(USB_LOG_LEVEL_INFO, NAME); 65 60 66 fibril_mutex_initialize(&usb_hub_list_lock); 61 67 fibril_mutex_lock(&usb_hub_list_lock); 62 68 usb_lst_init(&usb_hub_list); 63 69 fibril_mutex_unlock(&usb_hub_list_lock); 64 65 return ddf_driver_main(&hub_driver); 70 71 fid_t fid = fibril_create(usb_hub_control_loop, NULL); 72 if (fid == 0) { 73 fprintf(stderr, NAME ": failed to start monitoring fibril," \ 74 " driver aborting.\n"); 75 return ENOMEM; 76 } 77 fibril_add_ready(fid); 78 79 return driver_main(&hub_driver); 66 80 } 67 81
Note:
See TracChangeset
for help on using the changeset viewer.