Download Stellaris USB Library User's Guide
Transcript
Host Functions Description: This function is used to schedule and IN transaction on a USB HCD pipe. Parameters: ulPipe is the USB pipe to read data from. pucData is a pointer to store the data that is received. ulSize is the size in bytes of the buffer pointed to by pucData. This function will not block depending on the type of pipe passed in will schedule either a send of data to the device or a read of data from the device. In either case the amount of data will be limited to what will fit in the FIFO for a given endpoint. Returns: This function returns the number of bytes that were sent in the case of a transfer of data or it will return 0 for a request on a USB IN pipe. 4.3.4.20 USBHCDPipeStatus Definition: unsigned long USBHCDPipeStatus (unsigned long ulPipe ) Description: This function is used to return the current status of a USB HCD pipe. This function will return the current status for a given USB pipe. If there is no status to report this call will simply return USBHCD_PIPE_NO_CHANGE. Parameters: ulPipe is the USB pipe for this status request. Returns: This function returns the current status for the given endpoint. This will be one of the USBHCD_PIPE_∗ values. 4.3.4.21 USBHCDPipeWrite Definition: unsigned long USBHCDPipeWrite (unsigned long ulPipe , unsigned char *pucData , unsigned long ulSize ) Description: This function is used to write data to a USB HCD pipe. Parameters: ulPipe is the USB pipe to put data into. pucData is a pointer to the data to send. ulSize is the amount of data to send. This function will block until it has sent as much data as was requested using the USB pipe’s FIFO. The caller should have registered a callback with the USBHCDPipeAlloc() call in order to be informed when the data has been transmitted. The value returned by this function can be less than the ulSize requested if the USB pipe has less space available than this request is making. September 05, 2012 225