Skip to content
Snippets Groups Projects
Select Git revision
  • 3cbdcd36868693cfc1863231a1ec64507ce3d29f
  • master default protected
  • LUFA-170418
  • LUFA-151115
  • LUFA-140928
  • LUFA-140302
  • LUFA-130901
  • LUFA-130901-BETA
  • LUFA-130303
  • LUFA-120730
  • LUFA-120730-BETA
  • LUFA-120219
  • LUFA-120219-BETA
  • LUFA-111009
  • LUFA-111009-BETA
  • LUFA-110528
  • LUFA-110528-BETA
17 results

KeyboardHostWithParser.h

Blame
  • Descriptors.c 8.19 KiB
    /*
                 LUFA Library
         Copyright (C) Dean Camera, 2009.
                  
      dean [at] fourwalledcubicle [dot] com
          www.fourwalledcubicle.com
    */
    
    /*
      Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)
    	  
      Permission to use, copy, modify, and distribute this software
      and its documentation for any purpose and without fee is hereby
      granted, provided that the above copyright notice appear in all
      copies and that both that the copyright notice and this
      permission notice and warranty disclaimer appear in supporting
      documentation, and that the name of the author not be used in
      advertising or publicity pertaining to distribution of the
      software without specific, written prior permission.
    
      The author disclaim all warranties with regard to this
      software, including all implied warranties of merchantability
      and fitness.  In no event shall the author be liable for any
      special, indirect or consequential damages or any damages
      whatsoever resulting from loss of use, data or profits, whether
      in an action of contract, negligence or other tortious action,
      arising out of or in connection with the use or performance of
      this software.
    */
    
    /** \file
     *
     *  USB Device Descriptors, for library use when in USB device mode. Descriptors are special 
     *  computer-readable structures which the host requests upon device enumeration, to determine
     *  the device's capabilities and functions.  
     */
    
    #include "Descriptors.h"
    
    /** HID class report descriptor. This is a special descriptor constructed with values from the
     *  USBIF HID class specification to describe the reports and capabilities of the HID device. This
     *  descriptor is parsed by the host and its contents used to determine what data (and in what encoding)
     *  the device will send, and what it may be sent back from the host. Refer to the HID specification for
     *  more details on HID report descriptors.
     */
    USB_Descriptor_HIDReport_Datatype_t HIDReport[] =
    {
    	0x06, 0x9c, 0xff,     /* Usage Page (Vendor Defined)                     */
    	0x09, 0x19,           /* Usage (Vendor Defined)                          */
    	0xa1, 0x01,           /* Collection (Vendor Defined)                     */
    	0x0a, 0x19, 0x00,     /*   Usage (Vendor Defined)                        */
    	0x75, 0x08,           /*   Report Size (8)                               */
    	0x95, 0x82,           /*   Report Count (130)                            */
    	0x15, 0x00,           /*   Logical Minimum (0)                           */
    	0x25, 0xff,           /*   Logical Maximum (255)                         */
    	0x91, 0x02,           /*   Output (Data, Variable, Absolute)             */
    	0xc0                  /* End Collection                                  */
    };
    
    /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall
     *  device characteristics, including the supported USB version, control endpoint size and the
     *  number of device configurations. The descriptor is read out by the USB host when the enumeration
     *  process begins.
     */
    USB_Descriptor_Device_t DeviceDescriptor =
    {
    	.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
    		
    	.USBSpecification       = VERSION_BCD(01.10),
    	.Class                  = 0x00,