usb_config.h is a file used to configure the MCHPFSUSB stack and various function drivers. This file provides compile time selection of options provided by the stack. This file defines constants needed by the stack and various function drivers.
This section will detail the definitions required by the HID function driver. Additional definitions may be required by the stack itself. Please see the Files topic of the Stack section for more details about stack specific definitions.
Please note that the usb_config.h file can also be generated using the USBConfig.exe tool provided in the "<Install Directory>\USB Tools\USBConfig Tool" directory.
USB_USE_HID - This define lets the USB stack know that it will be using the HID function driver. This should be defined for any device using the HID driver.
#define USB_USE_HID
HID_INTF_ID - This defines the interface number for the HID device. This number should be unique within the configuration. Valid numbers range from 0-255.
#define HID_INTF_ID 0x00
HID_EP - This defines the endpoint number used by the HID driver. This number should be unique within the configuration.
#define HID_EP 1
HID_INT_OUT_EP_SIZE - this defines the size of the OUT endpoint used by the HID driver. The valid range is 1-64.
#define HID_INT_OUT_EP_SIZE 3
HID_INT_IN_EP_SIZE - this defines the size of the IN endpoint used by the HID driver. The valid range is 1-64.
#define HID_INT_IN_EP_SIZE 3
HID_NUM_OF_DSC - The HID class specifies its own class descriptors. This defines the number of HID descriptors that this device has in the current configuration.
#define HID_NUM_OF_DSC 1
HID_RPT01_SIZE - This is the size of the first HID report descriptor in bytes.
#define HID_RPT01_SIZE 50