how usbFunctionRead() called ?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
24c1024
Posts: 2
Joined: Sat Sep 10, 2016 7:07 am

how usbFunctionRead() called ?

Post by 24c1024 » Tue Sep 13, 2016 5:46 am

hi
usbFunctionWrite called this way to get data.

#if USB_CFG_IMPLEMENT_FN_WRITE
if(usbMsgFlags & USB_FLG_USE_USER_RW){
uchar rval = usbFunctionWrite(data, len);
if(rval == 0xff){ /* an error occurred */
usbTxLen = USBPID_STALL;
}else if(rval != 0){ /* This was the final package */
usbMsgLen = 0; /* answer with a zero-sized data packet */
}
}
#endif

but where usbFunctionRead() called ?

Post Reply