00000005.htm
来自「水木社区 embeded 版精华区 下载」· HTM 代码 · 共 808 行 · 第 1/4 页
HTM
808 行
} <br />void ISR_Ep3in(void) interrupt 0 <br />{ <br />} <br />void ISR_Ep3out(void) interrupt 0 <br />{ <br />} <br />void ISR_Ep4in(void) interrupt 0 <br />{ <br />} <br />void ISR_Ep4out(void) interrupt 0 <br />{ <br />} <br />void ISR_Ep5in(void) interrupt 0 <br />{ <br />} <br />void ISR_Ep5out(void) interrupt 0 <br />{ <br />} <br />void ISR_Ep6in(void) interrupt 0 <br />{ <br />} <br />void ISR_Ep6out(void) interrupt 0 <br />{ <br />} <br />void ISR_Ep7in(void) interrupt 0 <br />{ <br />} <br />void ISR_Ep7out(void) interrupt 0 <br />{ <br />} <br />;;------------------------------------------------------------------------- <br />---- <br />;; File: dscr.a51 <br />;; Contents: This file contains descriptor data tables. <br />;; <br />;; Copyright (c) 2001 Cypress Semiconductor, Inc. All rights reserved <br />;;-------------------------------------------------------------------------- <br />--- <br />DSCR_DEVICE equ 1 ;; Descriptor type: Device <br />DSCR_CONFIG equ 2 ;; Descriptor type: Configuration <br />DSCR_STRING equ 3 ;; Descriptor type: String <br />DSCR_INTRFC equ 4 ;; Descriptor type: Interface <br />DSCR_ENDPNT equ 5 ;; Descriptor type: Endpoint <br />ET_CONTROL equ 0 ;; Endpoint type: Control <br />ET_ISO equ 1 ;; Endpoint type: Isochronous <br />ET_BULK equ 2 ;; Endpoint type: Bulk <br />ET_INT equ 3 ;; Endpoint type: Interrupt <br />public DeviceDscr, ConfigDscr, StringDscr, UserDscr, HIDDscr, ReportDscr, R <br />eportDscrEnd <br />DSCR SEGMENT CODE <br />;;-------------------------------------------------------------------------- <br />--- <br />;; Global Variables <br />;;-------------------------------------------------------------------------- <br />--- <br />;; Note: This segment must be located in on-part memory. <br /> rseg DSCR ;; locate the descriptor table anywhere below 8K <br />DeviceDscr: db deviceDscrEnd-DeviceDscr ;; Descriptor length <br /> db DSCR_DEVICE ;; Decriptor type <br /> dw 0001H ;; Specification Version (BCD) <br /> db 00H ;; Device class <br /> db 00H ;; Device sub-class <br /> db 00H ;; Device sub-sub-class <br /> db 64 ;; Maximum packet size <br /> dw 4705H ;; Vendor ID <br /> dw 3010H ;; Product ID - set to default example ID <br /> dw 0100H ;; Product version ID <br /> db 0 ;; Manufacturer string index <br /> db 0 ;; Product string index <br /> db 0 ;; Serial number string index <br /> db 1 ;; Number of configurations <br />deviceDscrEnd: <br />ConfigDscr: db ConfigDscrEnd-ConfigDscr ;; Descriptor length <br /> db DSCR_CONFIG ;; Descriptor type <br /> db StringDscr-ConfigDscr ;; Configuration + End Points length (LSB) <br /> db (StringDscr-ConfigDscr)/256 ;; Configuration + End Points length (MSB) <br /> db 1 ;; Number of interfaces <br /> db 1 ;; Interface number <br /> db 0 ;; Configuration string <br /> db 10100000b ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu) <br /> db 0 ;; Power requirement (div 2 ma) <br />ConfigDscrEnd: <br />IntrfcDscr: <br /> db IntrfcDscrEnd-IntrfcDscr ;; Descriptor length <br /> db DSCR_INTRFC ;; Descriptor type <br /> db 0 ;; Zero-based index of this interface <br /> db 0 ;; Alternate setting <br /> db 2 ;; Number of end points <br /> db 03H ;; Interface class (HID) <br /> db 00H ;; Interface sub class <br /> db 00H ;; Interface sub sub class <br /> db 0 ;; Interface descriptor string index <br />IntrfcDscrEnd: <br />HIDDscr: <br /> db 09h ; length <br /> db 21h ; type: HID <br /> db 00h,01h ; release: HID class rev 1.0 <br /> db 00h ; country code (none) <br /> db 01h ; number of HID class descriptors to follow <br /> db 22h ; report descriptor type (HID) <br /> db (ReportDscrEnd-ReportDscr) ; length of HID descriptor <br /> db 00h <br />HIDDscrEnd: <br />EpInDscr: <br /> db EpInDscrEnd-EpInDscr ;; Descriptor length <br /> db DSCR_ENDPNT ;; Descriptor type <br /> db 82H ;; Endpoint number, and direction <br /> db ET_INT ;; Endpoint type <br /> db 40H ;; Maximun packet size (LSB) <br /> db 00H ;; Max packect size (MSB) <br /> db 01H ;; Polling interval <br />EpInDscrEnd: <br />EpOutDscr: <br /> db EpOutDscrEnd-EpOutDscr ;; Descriptor length <br /> db DSCR_ENDPNT ;; Descriptor type <br /> db 02H ;; Endpoint number, and direction <br /> db ET_INT ;; Endpoint type <br /> db 40H ;; Maximun packet size (LSB) <br /> db 00H ;; Max packect size (MSB) <br /> db 01H ;; Polling interval <br />EpOutDscrEnd: <br />ReportDscr: <br /> db 05h, 01h ; Usage Page (Generic Desktop) <br /> db 09h, 06h ; Usage (Keyboard) <br /> db 0A1h, 01h ; Collection (Application) <br /> db 05h, 07h ; Usage Page (Key codes) <br /> db 19h, 0E0h ; Usage minimum (234) <br /> db 29h, 0E7h ; Usage maximum (231) <br /> db 15h, 00h ; Logical minimum (0) <br /> db 25h, 01h ; Logical maximum (1) <br /> db 75h, 01h ; Report size (1) <br /> db 95h, 08h ; Report count (8) <br /> db 81h, 02h ; Input (data, variable, absolute) <br /> db 95h, 01h ; Report count (1) <br /> db 75h, 08h ; Report size (8) <br /> db 81h, 01h ; Input (constant) <br /> db 95h, 05h ; Report count (5) <br /> db 75h, 01h ; Report size (1) <br /> db 05h, 08h ; Usage Page (LED) <br /> db 19h, 01h ; Usage minimum (1) <br /> db 29h, 05h ; Usage maximum (5) <br /> db 91h, 02h ; Output (data, variable, absolute) <br /> db 95h, 01h ; Report count (1) <br /> db 75h, 03h ; Report size (3) <br /> db 91h, 01h ; Output (constant) <br /> db 95h, 03h ; Report count (3) <br /> db 75h, 08h ; Report size (8) <br /> db 15h, 00h ; Logical minimum (0) <br /> db 25h, 65h ; Logical maximum (101) <br /> db 05h, 07h ; Usage page (key codes) <br /> db 19h, 00h ; Usage minimum (0) <br /> db 29h, 65h ; Usage maximum (101) <br /> db 81h, 00h ; Input (data, array) <br /> db 0C0h ; End Collection <br />ReportDscrEnd: <br />StringDscr: <br />StringDscr0: <br /> db StringDscr0End-StringDscr0 ;; String descriptor length <br /> db DSCR_STRING <br /> db 09H,04H <br />StringDscr0End: <br />StringDscr1: <br /> db StringDscr1End-StringDscr1 ;; String descriptor length <br /> db DSCR_STRING <br /> db 'A',00 <br /> db 'n',00 <br /> db 'c',00 <br /> db 'h',00 <br /> db 'o',00 <br /> db 'r',00 <br /> db ' ',00 <br /> db 'C',00 <br /> db 'h',00 <br /> db 'i',00 <br /> db 'p',00 <br /> db 's',00 <br />StringDscr1End: <br />StringDscr2: <br /> db StringDscr2End-StringDscr2 ;; Descriptor length <br /> db DSCR_STRING <br /> db 'E',00 <br /> db 'Z',00 <br /> db '-',00 <br /> db 'U',00 <br /> db 'S',00 <br /> db 'B',00 <br /> db ' ',00 <br /> db 'D',00 <br /> db 'e',00 <br /> db 'v',00 <br /> db 'i',00 <br /> db 'c',00 <br /> db 'e',00 <br />StringDscr2End: <br />UserDscr: <br /> dw 0000H <br /> end <br /> <br />//从cypress工程师那里的来的,呵呵! <br />//我在cypress的开发板上试验过,工作的很好,你可以在这个基础上改的 <br />
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?