⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dscr.a51

📁 一本关于控制系统仿真的书的程序 1、文件夹1中的程序是书中的一些仿真。 2、文件2中的是最近做的预测控制、PID控制及逻辑控制的对比综合研究。 3、文件夹3中是与maltab通信的数据采集板的设
💻 A51
字号:
;;-----------------------------------------------------------------------------
;;   File:      dscr.a51
;;   Contents:  This file contains descriptor data tables.
;;
;; $Archive: /USB/Examples/Fx2lp/bulkloop/dscr.a51 $
;; $Date: 9/01/03 8:51p $
;; $Revision: 3 $
;;
;;
;;-----------------------------------------------------------------------------
;; Copyright 2003, Cypress Semiconductor Corporation
;;-----------------------------------------------------------------------------;;-----------------------------------------------------------------------------
                        ;; 描述符类型:设备,配置,字符串,接口,端点,  
DSCR_DEVICE   equ   1   ;; Descriptor type: Device
DSCR_CONFIG   equ   2   ;; Descriptor type: Configuration
DSCR_STRING   equ   3   ;; Descriptor type: String
DSCR_INTRFC   equ   4   ;; Descriptor type: Interface
DSCR_ENDPNT   equ   5   ;; Descriptor type: Endpoint
DSCR_DEVQUAL  equ   6   ;; Descriptor type: Device Qualifier

DSCR_DEVICE_LEN   equ   18
DSCR_CONFIG_LEN   equ    9
DSCR_INTRFC_LEN   equ    9
DSCR_ENDPNT_LEN   equ    7
DSCR_DEVQUAL_LEN  equ   10
					   ;; 端点类型:控制,同步,批量,中断。
ET_CONTROL   equ   0   ;; Endpoint type: Control
ET_ISO       equ   1   ;; Endpoint type: Isochronous
ET_BULK      equ   2   ;; Endpoint type: Bulk
ET_INT       equ   3   ;; Endpoint type: Interrupt

public      DeviceDscr, DeviceQualDscr, HighSpeedConfigDscr, FullSpeedConfigDscr, StringDscr, UserDscr

DSCR   SEGMENT   CODE PAGE

;;-----------------------------------------------------------------------------
;; Global Variables
;; 全局变量
;;-----------------------------------------------------------------------------
      rseg DSCR      ;; locate the descriptor table in on-part memory.
					 ;; 将描述符表置于片上存储器中.
DeviceDscr:   					;; 设备描述符..一台设备只能有一个设备描述符.
      db   DSCR_DEVICE_LEN      ;; Descriptor length (描述符长度.)
      db   DSCR_DEVICE   ;; Decriptor type (描述符类型.)
      dw   0002H      ;; Specification Version (BCD) (协议版本(BCD).
      db   00H        ;; Device class (设备类.)
      db   00H         ;; Device sub-class (设备子类.)
      db   00H         ;; Device sub-sub-class (设备子-子类.)
      db   64         ;; Maximum packet size (最大包长度.)
      dw   0B404H      ;; Vendor ID	(制造商ID(V ID).)
      dw   0410H      ;; Product ID (Sample Device)	(产品ID(PID:Sample Device).)
      dw   0000H      ;; Product version ID	 (产品版本ID.)
      db   1         ;; Manufacturer string index (生产厂商字符串索引.)
      db   2         ;; Product string index  (产品字符串索引.)
      db   0         ;; Serial number string index (序列号字符串索引.)
      db   1         ;; Number of configurations (配置数.)
																	 
DeviceQualDscr:				  ;; (设备限定描述符...对设备的限定特性.)
      db   DSCR_DEVQUAL_LEN   ;; Descriptor length (描述符长度.)
      db   DSCR_DEVQUAL   ;; Decriptor type	(描述符类型.)
      dw   0002H      ;; Specification Version (BCD) (协议版本(BCD).)
      db   00H        ;; Device class  (设备类.)
      db   00H         ;; Device sub-class	(设备子类.)
      db   00H         ;; Device sub-sub-class (设备子-子类.)
      db   64         ;; Maximum packet size  (最大包长度.)
      db   1         ;; Number of configurations  (配置数.)
      db   0         ;; Reserved (保留.)

HighSpeedConfigDscr:   					 ;; 高速配置描述符.
      db   DSCR_CONFIG_LEN               ;; Descriptor length
      db   DSCR_CONFIG                  ;; Descriptor type
      db   (HighSpeedConfigDscrEnd-HighSpeedConfigDscr) mod 256 ;; Total Length (LSB)
										 ;; 总长度(LSB)
      db   (HighSpeedConfigDscrEnd-HighSpeedConfigDscr)  /  256 ;; Total Length (MSB)
								      	 ;; 总长度(MSB)
      db   1      ;; Number of interfaces  (接口数)
      db   1      ;; Configuration number  (配置数)
      db   0      ;; Configuration string  (配置字符串)
      db   10000000b   ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu)
					   ;; 属性(B7为BUSPWR,B6为SELFPWR,B5为RWU)
      db   50      ;; Power requirement (div 2 ma) (功率需求)

;; Interface Descriptor			接口描述符
      db   DSCR_INTRFC_LEN      ;; Descriptor length  (长度)
      db   DSCR_INTRFC         ;; Descriptor type  (类型)
      db   0               ;; Zero-based index of this interface (该接口基于0的索引)
      db   0               ;; Alternate setting	(交替设置)
      db   4               ;; Number of end points (端点数)
      db   0ffH            ;; Interface class (接口子类)
      db   00H               ;; Interface sub class	(接口子-子类)
      db   00H               ;; Interface sub sub class	 (接口描述符字符串索引)
      db   0               ;; Interface descriptor string index
      
;; Endpoint Descriptor			端点描述符
      db   DSCR_ENDPNT_LEN      ;; Descriptor length (长度)
      db   DSCR_ENDPNT         ;; Descriptor type (类型)
      db   02H               ;; Endpoint number, and direction (端点数,方向)
      db   ET_BULK            ;; Endpoint type	(端点类型)
      db   00H               ;; Maximun packet size (LSB) (最大信息LSB)
      db   02H               ;; Max packect size (MSB) (最大信息包MSB)
      db   00H               ;; Polling interval   (选取间隔)

;; Endpoint Descriptor		   端点描述符
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   04H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   00H               ;; Maximun packet size (LSB)
      db   02H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval

;; Endpoint Descriptor		   端点描述符
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   86H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   00H               ;; Maximun packet size (LSB)
      db   02H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval

;; Endpoint Descriptor		    端点描述符
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   88H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   00H               ;; Maximun packet size (LSB)
      db   02H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval

HighSpeedConfigDscrEnd:   		 ;; 高速配置描述符结束.

FullSpeedConfigDscr:   			 ;; 全速配置描述符.
      db   DSCR_CONFIG_LEN               ;; Descriptor length (描述符长度)
      db   DSCR_CONFIG                  ;; Descriptor type (描述符类型)
      db   (FullSpeedConfigDscrEnd-FullSpeedConfigDscr) mod 256 ;; Total Length (LSB)
										;; 总长度(LSB)
      db   (FullSpeedConfigDscrEnd-FullSpeedConfigDscr)  /  256 ;; Total Length (MSB)
										;; 总长度(HSB)
      db   1      ;; Number of interfaces  (接口数)
      db   1      ;; Configuration number  (配置数)
      db   0      ;; Configuration string  (配置字符串)
      db   10000000b   ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu)
					   ;; 属性(B7为BUSPWR,B6为SELFPWR,B5为RWU)
      db   50      ;; Power requirement (div 2 ma)

;; Interface Descriptor			;; 接口描述符.
      db   DSCR_INTRFC_LEN      ;; Descriptor length
      db   DSCR_INTRFC         ;; Descriptor type
      db   0               ;; Zero-based index of this interface
      db   0               ;; Alternate setting
      db   4               ;; Number of end points 
      db   0ffH            ;; Interface class
      db   00H               ;; Interface sub class
      db   00H               ;; Interface sub sub class
      db   0               ;; Interface descriptor string index
      
;; Endpoint Descriptor			 ;; 端点描述符.
      db   DSCR_ENDPNT_LEN      ;; Descriptor length(描述符长度)
      db   DSCR_ENDPNT         ;; Descriptor type  (描述符类型)
      db   02H               ;; Endpoint number, and direction	(端点数,方向)
      db   ET_BULK            ;; Endpoint type	(端点类型)
      db   40H               ;; Maximun packet size (LSB) (最大信息包长度LSB)
      db   00H               ;; Max packect size (MSB) (最大信息包长度MSB)
      db   00H               ;; Polling interval (选取间隔)

;; Endpoint Descriptor		   ;; 端点描述符.
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   04H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   40H               ;; Maximun packet size (LSB)
      db   00H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval

;; Endpoint Descriptor			;; 端点描述符.
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   86H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   40H               ;; Maximun packet size (LSB)
      db   00H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval

;; Endpoint Descriptor			;; 端点描述符.
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   88H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   40H               ;; Maximun packet size (LSB)
      db   00H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval

FullSpeedConfigDscrEnd:   	 ;; 全速配置描述符结束

StringDscr:					 ;; 字符串描述符.

StringDscr0:   				 ;; 字符串描述符0.
      db   StringDscr0End-StringDscr0      ;; String descriptor length
      db   DSCR_STRING
      db   09H,04H
StringDscr0End:

StringDscr1:   				 ;; 字符串描述符1.
      db   StringDscr1End-StringDscr1      ;; String descriptor length
      db   DSCR_STRING
      db   'C',00
      db   'y',00
      db   'p',00
      db   'r',00
      db   'e',00
      db   's',00
      db   's',00
StringDscr1End:

StringDscr2:   				  ;; 字符串描述符2.
      db   StringDscr2End-StringDscr2      ;; Descriptor length
      db   DSCR_STRING
      db   'E',00
      db   'Z',00
      db   '-',00
      db   'U',00
      db   'S',00
      db   'B',00
	  db   'F',00
	  db   'X',00
	  db   '2',00
	  db   'L',00
	  db   'P',00
	  db   '(',00
	  db   'F',00
	  db   'a',00
	  db   'n',00
	  db   's',00
	  
	  db   ')',00
StringDscr2End:

UserDscr:      				 ;; 用户描述符.
      dw   0000H
      end
      

⌨️ 快捷键说明

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