Professional Documents
Culture Documents
//// These are the functions that are meant to be called by the user: ////
////
////
//// usb_init() - Initializes the USB stack, the USB peripheral and
////
////
////
////
////
////
usb_init_cs() instead.
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
sense pin denotes USB is connected and the USB peripheral ////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
are enumerated.
////
////
////
////
////
////
is enumerated.
////
////
////
////
//// usb_put_packet(endpoint, ptr, len, tgl) - Sends one packet to the ////
////
////
////
////
////
////
////
see usb_hw_layer.h
////
////
////
////
////
////
////
////
////
////
////
////
////
////
receiving data.
////
////
////
////
////
////
////
//// len = usb_get_packet(endpoint, ptr, max) - Gets one packet that ////
////
from the host/PC. usb_kbhit() must return TRUE before you ////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
prototype in USB.H.
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
usb_isr_tkn_setup_ClassInterface() in ////
////
usb.c
////
////
////
////
////
////
////
////
////
////
////
////
////
////
command).
////
////
////
////
////
////
////
////
or HID packets.
////
////
////
////
////
////
////
////
////
////
enumeration process.
////
////
////
////
////
////
////
////
////
////
USB_ENABLE_CONTROL
////
USB_ENABLE_ISOCHRONOUS
////
USB_ENABLE_BULK
////
USB_ENABLE_INTERRUPT
////
////
USB_ENABLE_DISABLED
////
////
////
////
////
////
////
descriptor, too.
////
////
////
////
////
////
////
packets.
////
////
////
////
//// *** NOTE *** You must have both USB_EPx_RX_ENABLE defined and
////
////
endpoint.
////
////
////
////
////
////
////
////
////
////
////
////
USB_ENABLE_CONTROL
////
////
USB_ENABLE_ISOCHRONOUS
////
USB_ENABLE_BULK
////
USB_ENABLE_INTERRUPT
////
////
USB_ENABLE_DISABLED
////
////
////
////
////
////
descriptor, too.
////
////
////
////
////
packets.
////
////
////
//// *** NOTE *** You must have both USB_EPx_TX_ENABLE defined and
////
////
endpoint.
////
////
////
////
////
////
////
//// USB_HID_DEVICE (TRUE) - HID devices require extra code to handle ////
////
////
////
////
////
////
////
(Windows) driver.
////
////
////
////
////
////
////
///////////////////////////////////////////////////////////////////////////
////
////
////
////
////
//// Many descriptor files had the self powered bit set incorrectly ////
////
based on USB_CONFIG_BUS_POWER.
////
////
////
////
////
////
////
////
//// Problem with descriptors larger than 127 bytes on 16-bit PICs
////
////
////
////
////
////
////
////
////
////
////
////
compatibility).
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
////
USB_STRING_DESC_OFFSET[]
////
////
////
////
////
////
////
////
////
////
////
////
data that either fit the boot protocol or HID protocol. ////
////
////
////
//// May 6th, 2003: Fixed a potential stack overflow using PCM
////
////
////
////
////
////