User manual

Table Of Contents
600
mikoC PRO for PIC32
MikroElektronika
USB Library
Universal Serial Bus (USB) provides a serial bus standard for connecting a wide variety of devices, including computers,
cell phones, game consoles, PDAs, etc.
USB Library contains HID routines that support HID class devices, and also the generic routines that can be used with
vendor specied drivers.
USB HID Class
The HID class consists primarily of devices that are used by humans to control the operation of computer systems.
Typical examples of HID class devices include:
- Keyboards and pointing devices, for example: standard mouse devices, trackballs, and joysticks.
- Front-panel controls, for example: knobs, switches, buttons, and sliders.
- Controls that might be found on devices such as telephones, VCR remote controls, games or simulation
devices, for example: data gloves, throttles, steering wheels, and rudder pedals.
- Devices that may not require human interaction but provide data in a similar format to HID class devices,
for example, bar-code readers, thermometers, or voltmeters.
Many typical HID class devices include indicators, specialized displays, audio feedback, and force or tactile feedback.
Therefore, the HID class denition includes support for various types of output directed to the end user.
Descriptor File
Each project based on the USB library should include a descriptor source le which contains vendor id and name,
product id and name, report length, and other relevant information. To create a descriptor le, use the integrated USB
HID terminal of mikroC PRO for PIC32 (Tools › USB HID Terminal). The default name for descriptor le is USBdsc.c,
but you may rename it.
Library Routines
- HID_Enable
- HID_Read
- HID_Write
- HID_Disable
- USB_Interrupt_Proc
- USB_Polling_Proc
- Gen_Enable
- Gen_Read
- Gen_Write