usbdDynamicAttachRegister vxworks 5.5 - VxWorks

This is a discussion on usbdDynamicAttachRegister vxworks 5.5 - VxWorks ; i make usb device driver for usb scanner device in VxWorks 5.5.i moved my step according wind river program api. and in the usb device init() function i called function usbdClientRegister ()and usbdDynamicAttachRegister() with correct parameters, and these two functions ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: usbdDynamicAttachRegister vxworks 5.5

  1. usbdDynamicAttachRegister vxworks 5.5

    i make usb device driver for usb scanner device in VxWorks 5.5.i moved my step according wind river program api.
    and in the usb device init() function i called function usbdClientRegister ()and usbdDynamicAttachRegister() with correct parameters, and these two functions return OK. in the later function usbdDynamicAttachRegister(), i register a callback function to find the device when the usb scanner is attached to the system. but when the usb scanner device is attached to the system(acctually to the USB Interface),the callback funtion is not called. at the same time,VxWorks is hung there. I do not have any idea why this happened,because the callback function can be called in VxWorks 6.6.
    So Please help me to solve this strange problem!
    Followings are my codes in function Init().

    #define USB_SCAN_CLASS 0xff /* SCAN dev CLASS */
    #define USB_SCAN_SUB_CLASS 0x00 /* SCAN dev sub class */
    #define USB_SCAN_DRIVE_PROTOCOL 0xff /* SCAN drive protocol */
    if (usbdClientRegister ("SCAN_CLASS", &usbdHandle) != OK ||
    usbdDynamicAttachRegister (usbdHandle, USB_SCAN_CLASS, USB_SCAN_SUB_CLASS, USB_SCAN_DRIVE_PROTOCOL, usbScanDevAttachCallback) != OK)
    {
    logMsg("usbScanDevInit: Client Registration Failed \n", 0,0,0,0,0,0);
    /*return (usbScanDevShutDown (S_usbBulkDevLib_USBD_FAULT));*/
    }

  2. Re: usbdDynamicAttachRegister vxworks 5.5

    now i find that when usb device is attached to the usb interface. normally, a interrupt should take place and then callback functon will be called. But in my usb 1.1 stack, when os is running, USBD Initialized ,UHCI Found , attached.
    But callback function is not called..
    i check the register of the interrupt in file
    if (usbPciIntConnect (intHandler, pHost, pHost->pciCfgHdr.intLine) != OK)
    {
    destroyHost (pHost);
    return S_usbHcdLib_INT_HOOK_FAILED;
    }
    codes above are to register the interrupt function .codes below are to enable the interrupt.
    UHC_SET_BITS (UHCI_USBINTR, UHC_INT_ENABLE_MASK);

    actually speaking, when hardware interrup happens, the interrupt function will called automatically...
    But in my OS. interrupt is not called.....
    buddies please help me to solve this problem... thanks a lot!

+ Reply to Thread