usb_report_desc.lst

来自「非常全的nrf2401设计资料」· LST 代码 · 共 199 行

LST
199
字号
C51 COMPILER V7.50   USB_REPORT_DESC                                                       04/09/2009 10:12:52 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE USB_REPORT_DESC
OBJECT MODULE PLACED IN .\build\usb_report_desc.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE usb_report_desc.c LARGE OMF2 OPTIMIZE(9,SPEED) BROWSE INCDIR(..\common;..\.
                    -.\..\..\comp\protocol\wdp\common\;..\..\..\..\comp\protocol\wdp\host\;..\..\..\..\arch\hal\include;..\..\..\..\arch\hal\
                    -nrf24lu1;..\..\..\..\arch\nrf24lu1;..\common;..\..\..\..\comp\protocol\fap) DEBUG PRINT(.\lst\usb_report_desc.lst) OBJEC
                    -T(.\build\usb_report_desc.obj)

line level    source

   1          /* Copyright (c) 2007 Nordic Semiconductor. All Rights Reserved.
   2           *
   3           * The information contained herein is confidential property of 
   4           * Nordic Semiconductor. The use, copying, transfer or disclosure 
   5           * of such information is prohibited except by express written
   6           * agreement with Nordic Semiconductor.
   7           */
   8          
   9          /** @file
  10           * HID report descriptors for mouse, keyboard and remote control
  11           *
  12           * @author Runar Kjellhaug
  13           */
  14          /** @{
  15           * @ingroup nordic_usb
  16           */
  17          
  18          #include "usb_hid_desc.h"
  19          #include "usb_desc.h"
  20          
  21          //-----------------------------------------------------------------------------
  22          // Report Descriptor(s) Declarations
  23          //-----------------------------------------------------------------------------
  24          
  25          //const hid_report_descriptor HIDREPORTDESC
  26          code const uint8_t g_usb_hid_report_1[HID_REPORT_DESCRIPTOR_SIZE_MOUSE] = // HID_REPORT_DESCRIPTOR_SIZE
  27          {
  28            0x05, 0x01,                        //     Usage Page (Generic Desktop)
  29            0x09, 0x02,                        //     Usage (Mouse)
  30            0xA1, 0x01,                        //     Collection (Application)
  31            0x09, 0x01,                        //     Usage (Pointer)
  32            0xA1, 0x00,                        //     Collection (Physical)
  33            0x95, 0x03,                        //     Report Count (3)
  34            0x75, 0x01,                        //     Report Size (1)
  35            0x05, 0x09,                        //     Usage Page (Buttons)
  36            0x19, 0x01,                        //     Usage Minimum (01)
  37            0x29, 0x03,                        //     Usage Maximum (01)
  38            0x15, 0x00,                        //     Logical Minimum (0)
  39            0x25, 0x01,                        //     Logical Maximum (1)
  40            0x81, 0x02,                        //     Input (Data, Variable, Absolute)
  41            0x95, 0x01,                        //     Report Count (1)
  42            0x75, 0x05,                        //     Report Size (5)
  43            0x81, 0x01,                        //     Input (Constant) for padding
  44            0x75, 0x08,                        //     Report Size (8)
  45            0x95, 0x03,                        //     Report Count (3)
  46            0x05, 0x01,                        //     Usage Page (Generic Desktop)
  47            0x09, 0x30,                        //     Usage (X)
  48            0x09, 0x31,                        //     Usage (Y)
  49            0x09, 0x38,                        //     USAGE (Wheel)
  50            0x15, 0x81,                        //     Logical Minimum (-127)
  51            0x25, 0x7F,                        //     Logical Maximum (127)
  52            0x81, 0x06,                        //     Input (Data, Variable, Relative)
C51 COMPILER V7.50   USB_REPORT_DESC                                                       04/09/2009 10:12:52 PAGE 2   

  53            0xC0,                              //   End Collection (Physical)
  54            0xC0                               // End Collection (Application)
  55          };
  56          
  57          code const uint8_t g_usb_hid_report_2[HID_REPORT_DESCRIPTOR_SIZE_KEYB] =
  58          {
  59            0x05, 0x01,                         // Usage Page (Generic Desktop)
  60            0x09, 0x06,                         // Usage (Keyboard)
  61            0xA1, 0x01,                         // Collection (Application)
  62            0x05, 0x07,                         //     Usage Page (Key Codes)
  63            0x19, 0xe0,                         //     Usage Minimum (224)
  64            0x29, 0xe7,                         //     Usage Maximum (231)
  65            0x15, 0x00,                         //     Logical Minimum (0)
  66            0x25, 0x01,                         //     Logical Maximum (1)
  67            0x75, 0x01,                         //     Report Size (1)
  68            0x95, 0x08,                         //     Report Count (8)
  69            0x81, 0x02,                         //     Input (Data, Variable, Absolute)
  70          
  71            0x95, 0x01,                         //     Report Count (1)
  72            0x75, 0x08,                         //     Report Size (8)
  73            0x81, 0x01,                         //     Input (Constant) reserved byte(1)
  74          
  75          //  0x95, 0x05,                         //     Report Count (5)
  76          //  0x75, 0x01,                         //     Report Size (1)
  77          //  0x05, 0x08,                         //     Usage Page (Page# for LEDs)
  78          //  0x19, 0x01,                         //     Usage Minimum (1)
  79          //  0x29, 0x05,                         //     Usage Maximum (5)
  80          //  0x91, 0x02,                         //     Output (Data, Variable, Absolute), Led report
  81          //  0x95, 0x01,                         //     Report Count (1)
  82          //  0x75, 0x03,                         //     Report Size (3)
  83          //  0x91, 0x01,                         //     Output (Data, Variable, Absolute), Led report padding
  84          
  85            0x95, 0x06,                         //     Report Count (6)
  86            0x75, 0x08,                         //     Report Size (8)
  87            0x15, 0x00,                         //     Logical Minimum (0)
  88            0x25, 0x65,                         //     Logical Maximum (101)
  89            0x05, 0x07,                         //     Usage Page (Key codes)
  90            0x19, 0x00,                         //     Usage Minimum (0)
  91            0x29, 0x65,                         //     Usage Maximum (101)
  92            0x81, 0x00,                         //     Input (Data, Array) Key array(6 bytes)
  93            0xC0                                // End Collection (Application)
  94          };
  95          
  96          #if 0
              code const uint8_t g_usb_hid_report_3[HID_REPORT_DESCRIPTOR_SIZE_RC] = 
              {
                0x05, 0x0C,       //usage page(Consumer Devices)
                0x09, 0x01,       // usage (consumer control)
                0xA1, 0x01,       // collection (application)
                0x05, 0x0C,       //usage page(Consumer Devices)
                0x09, 0x01,       // usage (consumer control)
                0xA1, 0x01,       //collection (application)
                //-----Start First Byte-----//
                0x0A, 0x24, 0x02, //Usage (Back)
                0x0A, 0x09, 0x02, //Usage (More Info)
                0x09, 0xB0,       //Usage (Play)
                0x09, 0xB1,       //Usage (Pause)
                0x09, 0xCD,       //Usage (Play/Pause)
                0x09, 0xB7,       //Usage (Stop)
                0x09, 0xB2,       //Usage (Record)
                0x09, 0xB3,       //Usage (Fast Forward)
                //-----Start Second Byte-----//
C51 COMPILER V7.50   USB_REPORT_DESC                                                       04/09/2009 10:12:52 PAGE 3   

                0x09, 0xB4,       //Usage (Rewind)
                0x09, 0xB5,       //Usage (Skip Forward)
                0x09, 0xB6,       //Usage (Skip Back)
                0x09, 0xE9,       //Usage (Volume Up)
                0x09, 0xEA,       //Usage (Volume Down)
                0x09, 0xE2,       //Usage (Mute)
                0x09, 0x9C,       //Usage (Chan/Page Up)
                0x09, 0x9D,       //Usage (Chan/Page Down)
                //-----Start Third Byte-----//
                0x09, 0x8D,       //Usage (Guide)
                0x0A, 0x08, 0x02, //Usage (Print)
                0x15, 0x00,       //LOGICAL_MINIMUM (0)
                0x25, 0x01,       //LOGICAL_MAXIMUM (1)
                0x75, 0x01,       //REPORT_SIZE (1)
                0x95, 0x12,       //REPORT_COUNT(18)
                0x81, 0x02,       //input (Data, Variable, Absolute)
                0xC0,             //End collection
                
                0x05, 0x01,       //Usage Page (Generic Desktop)
                0x09, 0x80,       //Usage (System Control)
                0xA1, 0x01,       //Collection (Application)
                0x09, 0x82,       //Usage (Power Off)
                0x09, 0x82,       //Usage (Power toggle (standby))
                0x09, 0x83,       //Usage (Power On)
                0x75, 0x01,       //REPORT_SIZE (1)
                0x95, 0x03,       //REPORT_COUNT(3)
                0x81, 0x02,       //input (Data, Variable, Absolute)
              
                0x75, 0x01,         //report size (1 bits)
                0x95, 0x03,         //report count (3 reports)
                0x81, 0x01,         //input (Cnst)
                
                0xC0,             //End collection
                0xC0,             //End Collection
              };
              
              #endif
 152          
 153          code hal_usb_hid_t g_usb_hid_hids[] = 
 154              {
 155                  { &g_usb_conf_desc.hid1, g_usb_hid_report_1, sizeof(g_usb_hid_report_1) },
 156                  { &g_usb_conf_desc.hid2, g_usb_hid_report_2, sizeof(g_usb_hid_report_2) },
 157          #if 0
                      { &g_usb_conf_desc.hid3, g_usb_hid_report_3, sizeof(g_usb_hid_report_3) },
              #endif
 160              };
 161          
 162          /** @} */


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   ----    ----
   CONSTANT SIZE    =    111    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
   EDATA SIZE       =   ----    ----
   HDATA SIZE       =   ----    ----
   XDATA CONST SIZE =   ----    ----
   FAR CONST SIZE   =   ----    ----
C51 COMPILER V7.50   USB_REPORT_DESC                                                       04/09/2009 10:12:52 PAGE 4   

END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?