📄 usb_descr.asm
字号:
;;*****************************************************************************
;;*****************************************************************************
;; FILENAME: USB_descr.asm
;; Version: 1.5, Updated on 2006/06/19 at 11:43:56
;; Generated by PSoC Designer ver 4.4 b1884 : 14 Jan, 2007
;;
;; DESCRIPTION: USB User Module Descriptors
;;
;; NOTE: User Module APIs conform to the fastcall convention for marshalling
;; arguments and observe the associated "Registers are volatile" policy.
;; This means it is the caller's responsibility to preserve any values
;; in the X and A registers that are still needed after the API
;; function returns. Even though these registers may be preserved now,
;; there is no guarantee they will be preserved in future releases.
;;-----------------------------------------------------------------------------
;; Copyright (c) Cypress Semiconductor 2004, 2005. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************
include "m8c.inc"
include "USB.inc"
include "USB_macros.inc"
WIZARD: equ 1
WIZARD_DEFINED_REPORT_STORAGE: EQU 1
;---------------------------------------------------
;@PSoC_UserCode_BODY_1@ (Do not change this line.)
;---------------------------------------------------
; Insert your custom code below this banner
;---------------------------------------------------
; Redefine the WIZARD equate to 0 below by
; uncommenting the WIZARD: equ 0 line
; to allow your custom descriptor to take effect
;---------------------------------------------------
; WIZARD: equ 0
; WIZARD_DEFINED_REPORT_STORAGE: EQU 0
;---------------------------------------------------
; Insert your custom code above this banner
;---------------------------------------------------
;@PSoC_UserCode_END@ (Do not change this line.)
IF WIZARD
;-----------------------------------------------
; USB Descriptors--Generated by the USB Setup Wizard
;-----------------------------------------------
AREA UserModules (ROM,REL,CON)
;----------------------------------------------------------------------
; Descriptor Dispatch Tables
; The following tables provide the dispatching pointers and
; descriptor lengths necessary for the request handler to
; respond to USB requests.
;----------------------------------------------------------------------
;----------------------------------------------------------------------
; Device Dispatch Table
; for User Module: (USB)
;----------------------------------------------------------------------
AREA func_lit (ROM,REL,CON)
EXPORT USB_DEVICE_LOOKUP
.LITERAL
USB_DEVICE_LOOKUP: ;
LT_START 1 ; Number of devices defined for USB
LT_ENTRY USB_D0_CONFIG_LOOKUP, USB_D0_CONFIG_DESCR_TABLE
.ENDLITERAL
;----------------------------------------------------------------------
; Configuration Dispatch Table
; for Device: (USB_D0)
;----------------------------------------------------------------------
AREA func_lit (ROM,REL,CON)
EXPORT USB_D0_CONFIG_LOOKUP
.LITERAL
USB_D0_CONFIG_LOOKUP: ;
LT_START 1 ; Number of configurations
LT_ENTRY USB_D0_C1_EP_SETUP, USB_D0_C1_INTERFACE_LOOKUP
.ENDLITERAL
;----------------------------------------------------------------------
; Interface Look Up Table
;
; This look up table points to three tables. Each of those tables is
; indexed by the selected interface number provided by the request.
;
; Item 0: HID Report GET_REPORT/SET_REPORT Lookup Table
; Item 1: HID Report Descriptor Transfer Descriptor Table
; Item 2: HID Class Descriptor Transfer Descriptor Table
;----------------------------------------------------------------------
AREA func_lit (ROM,REL,CON)
EXPORT USB_D0_C1_INTERFACE_LOOKUP
.LITERAL
USB_D0_C1_INTERFACE_LOOKUP: ;
DW USB_D0_C1_INTERFACE_RPT_LOOKUP ; Interface GET_REPORT/SET_REPORT Lookup Table
DW USB_D0_C1_HID_RPT_DESCR_TABLE ; HID Report Descriptor Transfer Descriptor Table
DW USB_D0_C1_HID_CLASS_DESCR_TABLE ; HID Class Descriptor Transfer Descriptor Table
.ENDLITERAL
;----------------------------------------------------------------------
; Endpoint Setup Table
;
; This table provides the data to configure the endpoint mode registers
; for IN/OUT direction.
;----------------------------------------------------------------------
AREA func_lit (ROM,REL,CON)
.LITERAL
USB_D0_C1_EP_SETUP: ;
DB USB_DIR_IN ; Endpoint EP1(IN)
DB USB_DIR_UNUSED ; Endpoint EP2 not used for this configuration
.ENDLITERAL
;----------------------------------------------------------------------
; Interface Lookup Table
;
; This table is indexed by interface number.
;
;----------------------------------------------------------------------
EXPORT USB_D0_C1_INTERFACE_RPT_LOOKUP
.LITERAL
USB_D0_C1_INTERFACE_RPT_LOOKUP: ;
DW USB_D0_C1_I0_HID_RPT_LOOKUP
.ENDLITERAL
;----------------------------------------------------------------------
; HID Class Descriptor transfer descriptor table
;----------------------------------------------------------------------
AREA func_lit (ROM,REL,CON)
EXPORT USB_D0_C1_HID_CLASS_DESCR_TABLE
.LITERAL
USB_D0_C1_HID_CLASS_DESCR_TABLE: ;
TD_START_TABLE 1 ; Number of interfaces/HID Class Descriptors
TD_ENTRY USB_DS_ROM, DESCR_SIZE_HID_CLASS, USB_D0_C1_I0_HID_DESCR_START, NULL_PTR
.ENDLITERAL
;----------------------------------------------------------------------
; HID Report Descriptor transfer descriptor table
;----------------------------------------------------------------------
AREA func_lit (ROM,REL,CON)
EXPORT USB_D0_C1_HID_RPT_DESCR_TABLE
.LITERAL
USB_D0_C1_HID_RPT_DESCR_TABLE: ;
TD_START_TABLE 1 ; Number of interfaces/HID Report Descriptors
TD_ENTRY USB_DS_ROM, USB_HID_REPORT_1_DESCR_SIZE, USB_HID_REPORT_1_DESCR_START, NULL_PTR
.ENDLITERAL
;----------------------------------------------------------------------
; HID Report Lookup Table for (USB_D0_C1_I0)
;----------------------------------------------------------------------
AREA func_lit (ROM,REL,CON)
.LITERAL
USB_D0_C1_I0_HID_RPT_LOOKUP:
LT_START 4 ; 4 Entries
LT_ENTRY USB_D0_C1_I0_IN_RPTS, NULL_PTR ; IN Reports
LT_ENTRY USB_D0_C1_I0_OUT_RPTS, NULL_PTR ; OUT Reports
LT_ENTRY USB_D0_C1_I0_FEATURE_RPTS, NULL_PTR; FEATURE Reports
.ENDLITERAL
;----------------------------------------------------------------------
; HID IN Report Transfer Descriptor Table for ()
;----------------------------------------------------------------------
IF WIZARD_DEFINED_REPORT_STORAGE
AREA func_lit (ROM,REL,CON)
.LITERAL
USB_D0_C1_I0_IN_RPTS:
TD_START_TABLE 1 ; Only 1 Transfer Descriptor
TD_ENTRY USB_DS_RAM, USB_HID_RPT_1_IN_RPT_SIZE, USB_INTERFACE_0_IN_RPT_DATA, NULL_PTR
.ENDLITERAL
ENDIF ; WIZARD_DEFINED_REPORT_STORAGE
;----------------------------------------------------------------------
; HID OUT Report Transfer Descriptor Table for ()
;----------------------------------------------------------------------
IF WIZARD_DEFINED_REPORT_STORAGE
AREA func_lit (ROM,REL,CON)
.LITERAL
USB_D0_C1_I0_OUT_RPTS:
TD_START_TABLE 1 ; Only 1 Transfer Descriptor
TD_ENTRY USB_DS_RAM, USB_HID_RPT_1_OUT_RPT_SIZE, USB_INTERFACE_0_OUT_RPT_DATA, NULL_PTR
.ENDLITERAL
ENDIF ; WIZARD_DEFINED_REPORT_STORAGE
;----------------------------------------------------------------------
; HID FEATURE Report Transfer Descriptor Table for ()
;----------------------------------------------------------------------
IF WIZARD_DEFINED_REPORT_STORAGE
AREA func_lit (ROM,REL,CON)
.LITERAL
USB_D0_C1_I0_FEATURE_RPTS:
TD_START_TABLE 1 ; Only 1 Transfer Descriptor
TD_ENTRY USB_DS_RAM, USB_HID_RPT_1_FEATURE_RPT_SIZE, USB_INTERFACE_0_FEATURE_RPT_DATA, NULL_PTR
.ENDLITERAL
ENDIF ; WIZARD_DEFINED_REPORT_STORAGE
;----------------------------------------------------------------------
;----------------------------------------------------------------------
; Configuration Descriptor Table
; for (USB_D0)
;
; This table provides transfer descriptors for each USB Configuration
; Descriptor
;----------------------------------------------------------------------
AREA func_lit (ROM,REL,CON)
.LITERAL
USB_D0_CONFIG_DESCR_TABLE: ;
TD_START_TABLE 1 ; Number of configurations
TD_ENTRY USB_DS_ROM, USB_D0_C1_DESCR_SIZE, USB_D0_C1_DESCR_START, NULL_PTR
.ENDLITERAL
;----------------------------------------------------------------------
; Device Descriptor Table
;
; This table provides transfer descriptors for each USB Device Descriptor
;----------------------------------------------------------------------
AREA func_lit (ROM,REL,CON)
EXPORT USB_DEVICE_DESCR_TABLE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -