Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 6th, 2010  |  syntax: None  |  size: 0.80 KB  |  views: 125  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. case USB_INSERTED:
  2.                 /* inject an event into the button queue so the main thread
  3.                  * will run the USB-UI code and return after the desired
  4.                  * drivers are enabled */
  5.                 usb_state = USB_POWERED;
  6.                 queue_send(&button_queue, SYS_USB_ATTACHED, NULL);
  7.                 break;
  8.  
  9.  
  10.  
  11. ==============================================
  12.  
  13.  
  14. case SYS_USB_ATTACHED:
  15. #ifdef USB_ENABLE_STORAGE
  16.             usb_core_enable_driver(USB_DRIVER_MASS_STORAGE, false);
  17. #endif
  18. #ifdef USB_ENABLE_HID
  19.             usb_core_enable_driver(USB_DRIVER_HID, false);
  20. #endif
  21. #ifdef USB_ENABLE_CHARGING_ONLY
  22.             usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY, false);
  23. #endif
  24.             usb_core_enable_driver(USB_DRIVER_MTP, true);
  25.             return 1;