|
Name |
Description |
![]() |
This function is called whenever the USB stack wants to notify the user of an event. | |
![]() |
This function cancels the transfers pending on the specified endpoint. This function can only be used after a SETUP packet is received and before that setup packet is handled. This is the time period in which the EVENT_EP0_REQUEST is thrown, before the event handler function returns to the stack. | |
![]() |
This function allows the data stage of either a host-to-device or device-to-host control transfer (with data stage) to complete. This function is meant to be used in conjunction with either the USBDeferOUTDataStage() or USBDeferINDataStage(). If the firmware does not call either USBDeferOUTDataStage() or USBDeferINDataStage(), then the firmware does not need to manually call USBCtrlEPAllowDataStage(), as the USB stack will call this function instead. | |
![]() |
This function prepares the proper endpoint 0 IN or endpoint 0 OUT (based on the controlTransferState) to allow the status stage packet of a control transfer to complete. This function gets used internally by the USB stack itself, but it may also be called from the application firmware, IF the application firmware called the USBDeferStatusStage() function during the initial processing of the control transfer request. In this case, the application must call the USBCtrlEPAllowStatusStage() once, after it has fully completed processing and handling the data stage portion of the request. If the application firmware has no need for delaying... more | |
![]() |
This function will cause the USB hardware to continuously NAK the IN token packets sent from the host, during the data stage of a device to host control transfer. This allows the firmware more time to process and prepare the IN data packets that will eventually be sent to the host. This is also useful, if the firmware needs to process/prepare the IN data in a different context than what the USBDeviceTasks() function executes at. Calling this function (macro) will assert ownership of the currently pending control transfer. Therefore, the USB stack will not STALL when it reaches the... more | |
![]() |
This function will cause the USB hardware to continuously NAK the OUT data packets sent from the host, during the data stage of a device to host control transfer. This allows the firmware more time to prepare the RAM buffer that will eventually be used to receive the data from the host. This is also useful, if the firmware wishes to receive the OUT data in a different context than what the USBDeviceTasks() function executes at. Calling this function (macro) will assert ownership of the currently pending control transfer. Therefore, the USB stack will not STALL when it reaches... more | |
![]() |
Calling this function will prevent the USB stack from automatically enabling the status stage for the currently pending control transfer from completing immediately after all data bytes have been sent or received. This is useful if a class handler or USB application firmware project uses control transfers for sending/receiving data over EP0, but requires time in order to finish processing and/or to consume the data. For example: Consider an application which receives OUT data from the USB host, through EP0 using control transfers. Now assume that this application wishes to do something time consuming with this data (ex: transmit it... more | |
![]() |
Checks if VBUS is present, and that the USB module is not already initalized, and if so, enables the USB module so as to signal device attachment to the USB host. | |
![]() |
This function configures the USB module to "soft detach" itself from the USB host. | |
![]() |
This function initializes the device stack it in the default state. The USB module will be completely reset including all of the internal variables, registers, and interrupt flags. | |
![]() |
This function is the main state machine/transaction handler of the USB device side stack. When the USB stack is operated in "USB_POLLING" mode (usb_config.h user option) the USBDeviceTasks() function should be called periodically to receive and transmit packets through the stack. This function also takes care of control transfers associated with the USB enumeration process, and detecting various USB events (such as suspend). This function should be called at least once every 1.8ms during the USB enumeration process. After the enumeration process is complete (which can be determined when USBGetDeviceState() returns CONFIGURED_STATE), the USBDeviceTasks() handler may be called the... more | |
![]() |
This function will enable the specified endpoint with the specified options | |
![]() |
Sets the destination, size, and a function to call on the completion of the next control write. | |
![]() |
Sets the source, size, and options of the data you wish to send from a RAM source | |
![]() |
Sets the source, size, and options of the data you wish to send from a const source | |
![]() |
Sets the address of the data to send over the control endpoint | |
![]() |
This function retrieves a 32-bit unsigned integer that normally increments by one every one millisecond. The count value starts from zero when the USBDeviceInit() function is first called. See the remarks section for details on special circumstances where the tick count will not increment. | |
![]() |
This function retrieves a 8-bit unsigned byte that represents the number of milliseconds that have elapsed since the end of a USB suspend event. The value saturates at 255. | |
![]() |
This function will return the current state of the device on the USB. This function should return CONFIGURED_STATE before an application tries to send information on the bus. | |
![]() |
Retrieves the handle to the next endpoint BDT entry that the USBTransferOnePacket() will use. | |
![]() |
This function indicates if remote wakeup has been enabled by the host. Devices that support remote wakeup should use this function to determine if it should send a remote wakeup. | |
![]() |
This function indicates if the USB port that this device is attached to is currently suspended. When suspended, it will not be able to transfer data over the bus. | |
![]() |
Checks to see if the input handle is busy | |
![]() |
Retrieves the address of the destination buffer of the input handle | |
![]() |
Retrieves the length of the destination buffer of the input handle | |
![]() |
This function increments internal 1ms time base counters, which are useful for application code (that can use a 1ms time base/counter), and for certain USB event timing specific purposes. In USB full speed applications, the application code does not need to (and should not) explicitly call this function, as the USBDeviceTasks() function will automatically call this function whenever a 1ms time interval has elapsed (assuming the code is calling USBDeviceTasks() frequently enough in USB_POLLING mode, or that USB interrupts aren't being masked for more than 1ms at a time in USB_INTERRUPT mode). In USB low speed applications, the... more | |
![]() |
Returns true if a control transfer with IN data stage is pending, and the firmware has called USBDeferINDataStage(), but has not yet called USBCtrlEPAllowDataStage(). Returns false if a control transfer with IN data stage is either not pending, or the firmware did not call USBDeferINDataStage() at the start of the control transfer. This function (macro) would typically be used in the case where the USBDeviceTasks() function executes in the interrupt context (ex: USB_INTERRUPT option selected in usb_config.h), but the firmware wishes to take care of handling the data stage of the control transfer in the main... more | |
![]() |
This function indicates if the USB bus is in suspend mode. | |
![]() |
This function indicates if the USB module is in suspend mode. | |
![]() |
Returns true if a control transfer with OUT data stage is pending, and the firmware has called USBDeferOUTDataStage(), but has not yet called USBCtrlEPAllowDataStage(). Returns false if a control transfer with OUT data stage is either not pending, or the firmware did not call USBDeferOUTDataStage() at the start of the control transfer. This function (macro) would typically be used in the case where the USBDeviceTasks() function executes in the interrupt context (ex: USB_INTERRUPT option selected in usb_config.h), but the firmware wishes to take care of handling the data stage of the control transfer in the main... more | |
![]() |
Receives the specified data out the specified endpoint | |
![]() |
This function performs a detach from the USB bus via software. | |
![]() |
Configures the specified endpoint to send STALL to the host, the next time the host tries to access the endpoint. | |
![]() |
Transfers a single packet (one transaction) of data on the USB bus. | |
![]() |
Sends the specified data out the specified endpoint |
MLA - USB Library Help Version : 2.16
![]() |