Page 1 of 1

how usbFunctionRead() called ?

Posted: Tue Sep 13, 2016 5:46 am
by 24c1024
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 ?