AnsweredAssumed Answered

Using command ADI_USB_CMD_SET_PF

Question asked by gpetrowitsch on Aug 20, 2010
Latest reply on Aug 23, 2010 by MartinK

Hi all,

 

I want to use FSS on my BF548 sytsem and add an USB driver to it.

I do this the same way it's done in the shell_browser example, by

adding this line to the adi_fss_Config table:

  { ADI_FSS_CMD_ADD_DRIVER, (void *)&ADI_USB_Def }

and of course having included the right files (like this):

  #define _ADI_USB_DEFAULT_DEF_
  #include <drivers/pid/usb/adi_usb.h>

However, if I do so, the initialization of the USB driver hangs forever,

because my system uses PE11 instead of PE7 to switch on Vbus.

 

Now, the adi_usb_hdrc driver provides a command for this problem:

ADI_USB_CMD_SET_PF.

But if I add a small command table table to my ADI_USB_Def

(like this)

  ADI_DEV_CMD_VALUE_PAIR usb_Config[] = {
    { ADI_USB_CMD_SET_PF, (void*)ADI_FLAG_PE11 },
    { ADI_DEV_CMD_END, (void*)NULL }
  };
  ADI_USB_Def.pConfigTable = usb_Config;

before calling adi_fss_Init, the USB driver initialization fails, because

the table is processed by the adi_usb driver, which doesn't understand

the command ADI_USB_CMD_SET_PF and doesn't hand it over to

the adi_usb_hdrc driver.

 

Can someone tell me, how I get it through down to the adi_usb_hdrc

driver? I'm afraid I don't understand how adi_usb.c and adi_usb_hdrc.c

work together...

 

Thanks & kind regards,

Gerhard

Outcomes