Changeset 4c74ac3 in mainline for uspace/drv/usbhub/main.c
- Timestamp:
- 2010-12-12T14:46:13Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 16ecc28
- Parents:
- b666608
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/main.c
rb666608 r4c74ac3 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 #include <usb/usbdrv.h> 28 29 29 #include <driver.h> 30 30 #include <errno.h> 31 #include <async.h> 32 33 #include <usb/usbdrv.h> 31 34 #include "usbhub.h" 32 35 #include "usbhub_private.h" … … 44 47 }; 45 48 49 int usb_hub_control_loop(void * noparam){ 50 while(true){ 51 usb_hub_check_hub_changes(); 52 async_usleep(10000); 53 } 54 return 0; 55 } 56 57 46 58 int main(int argc, char *argv[]) 47 59 { 48 60 usb_lst_init(&usb_hub_list); 61 fid_t fid = fibril_create(usb_hub_control_loop, NULL); 62 if (fid == 0) { 63 printf("%s: failed to start fibril for HUB devices\n", NAME); 64 return ENOMEM; 65 } 66 fibril_add_ready(fid); 67 49 68 return driver_main(&hub_driver); 50 69 }
Note:
See TracChangeset
for help on using the changeset viewer.