Functions and Macros

Microchip USB Device Library

USB Device Library Help
Functions and Macros
Functions
 
Name 
Description 
 
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 of the USB device side stack. This function should be called periodically to receive and transmit packets through the stack. This function should be called preferably once every 100us during the enumeration process. After the enumeration process this function still needs to be called periodically to respond to various situations on the bus but is more relaxed in its time requirements. This function should also be called at least as fast as the OUT data expected from the PC. 
 
This function will enable the specified endpoint with the specified options 
 
This function is called whenever the device receives a SET_CONFIGURATION request. 
 
Call back that is invoked when a USB suspend is detected. 
 
This call back is invoked when a wakeup from USB suspend is detected. 
 
This function is called whenever a request comes over endpoint 0 (the control endpoint) that the stack does not know how to handle. 
 
This function should be called to initiate a remote wakeup. (optional) 
 
This callback is called whenever a USB error occurs. (optional) 
 
This callback is called when a SET_DESCRIPTOR request is received (optional) 
 
This callback is called when a SOF packet is received by the host. (optional) 
 
This function is called whenever a EP0 data packet is received. (optional) 
Macros
 
Name 
Description 
 
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. 
 
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 this device is currently suspended. When a device is 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 
MCHPFSUSB Device Library > Stack > Public API Members > Functions and Macros
Microchip MCHPFSUSB v2.3 - Sept 20, 2008
Copyright © 2008 Microchip Technology, Inc.  All rights reserved.