Help: usbFunctionWrite isn't called

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
iphi
Rank 2
Rank 2
Posts: 68
Joined: Mon Jun 25, 2007 11:37 am

Help: usbFunctionWrite isn't called

Post by iphi » Sat Jul 14, 2007 10:48 pm

I have problems implementing usbFunctionWrite.

Here is what I did:

-implemented usbFunctionWrite in main.c
-in usbFunctionSetup: return 0xff
-in usbconfig.h: #define USB_CFG_IMPLEMENT_FN_WRITE 1

But nevertheless usbFunctionWrite is never reached regardless of the control messages I send.

Have I missed something?

iphi
Rank 2
Rank 2
Posts: 68
Joined: Mon Jun 25, 2007 11:37 am

Post by iphi » Sun Jul 15, 2007 1:54 pm

Problem solved! It was a problem on my host program!

ionte
Posts: 4
Joined: Tue Oct 20, 2009 12:08 am

Re: Help: usbFunctionWrite isn't called

Post by ionte » Sat Oct 24, 2009 12:48 am

I have the exact same problem. Do you remember what your problem in the host program was?

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Help: usbFunctionWrite isn't called

Post by christian » Sun Nov 01, 2009 11:01 am

Make sure that you do a "make clean" after changing USB_CFG_IMPLEMENT_FN_WRITE in usbconfig.h. The makefile does not contain dependencies on this file, as far as I remember. Or delete all object files manually to ensure that everything is re-compiled.

johnnyblame
Posts: 1
Joined: Wed Nov 04, 2009 11:56 am

Re: Help: usbFunctionWrite isn't called

Post by johnnyblame » Wed Nov 04, 2009 12:14 pm

Hi
I am trying to use V-Usb to control a display To send text to the display I thought I would use control messages, using usbFunctionWrite() to get the string data.
I have got the communication up and running: there are valid calls to usbFunctionSetup(), but usbFunctionWrite() is never called. Thus I never get any data.
I need some help to decode that!

Post Reply