亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mouse45b.asm

?? USB大全電子版全部資料3~包含源碼、協(xié)議等
?? ASM
?? 第 1 頁 / 共 5 頁
字號:
;***********************************************************************

;				Cypress Semiconductor

; 			Mouse Demonstration Design Kit Firmware 

;

; Features :

; Three button mouse

; Passes Chapter 9 and Hidview Tests 

; Includes Suspend/Resume Feature

; Includes Remote Wakeup Feature

;

; This firmware file is for demonstration purposes only.  

; Cypress Semiconductor will not assume any liability for its use.
;=======================================================================
; 5/29/98	wmh	v4.5b	Made another copy of the mouse firmware
; This version is HID Draft4 compliant (Won't work with OSR2.1)
; Differences between HID Draft3 and Draft4 compliance is only in the order
; in which the class and endpoint descriptors are sent to the host.
; Draft3 : Endpoint first then Class
; Draft4 : Class first then Endpoint
; This means that the only differences will be in the ROM lookup table
; and the GetHIDDescriptor request in the USB_EP0_ISR
;=======================================================================

; 03/10/98	lxa   v4.5	Modified control_read routines

; control_read and control_read2 did not properly handle the case where

; the total number of data bytes to send was a multiple of 8.  In this

; case, the transmission has to send a zero-length data packet to 

; terminate the data stage.

;=======================================================================

; 02/03/98	lxa	v4.4 	Change in USB_EP0_ISR

; GetStringdescriptor sends string report descriptor.

; Added string descriptors in the ROM lookup table.

;=======================================================================

; 01/06/98	lxa	v4.3	Added some new routines. 

; Added GetIdle, SetIdle and GetReport.

; Added execute2 and control_read2 to be able to send data from

; a RAM buffer.

;=======================================================================

; 01/08/98	wmh	v4.2	Remote Wakeup bug Fix

; Wakeup_ISR changed so that we force J state then clear it before 

; doing a Force Resume

;=======================================================================

; 12/01/97	wmh	v4.1	Exchanged Endpoint and Class Descriptors in the 

; ROM lookup table so that Endpoint comes before Class

; Change in GetHIDDescriptor to accomodate this.

;=======================================================================

; 11/11/97	wmh	v4.0	Change in main, ReadButtons and One_msec

; Debouncing the buttons + drag solution

;=======================================================================

; 11/7/97	wmh	v3.9	Change in main, ReadButtons, CheckHorizontal

; and CheckVertical to solve count loss in movement

;=======================================================================

; 10/13/97	wmh	v3.8	Change in USB_EP0_ISR

; SetConfiguration request was changed so as to enable endpoint 1

; GetReport is stalled

; GetReportDescriptor sends HID Report Descriptor

;========================================================================

; 9/26/97	wmh 	v3.7 small changes

; One_mSec_ISR and Reset have been changed

;========================================================================

; 8/29/97	wmh 	v3.5	Remote Wake function added

; Remote Wakeup interrupt has been added (Wakeup_ISR)

; The One_mSec_ISR has been changed to accomodate remote wakeup

;========================================================================

; 8/21/97   wmh   v2.4.4 control read correction (Endpoint_0 ISR)

; Fixes the case where the host resends a setup packet

;========================================================================

; 7/9/97	wmh	v2.4.3 add features

; Turning the LED's off and on has been added to the suspend/Resume

; subroutine in the One_mSec_ISR

;========================================================================

; 7/3/97	wmh	v2.4.2 add features

; Suspend/Resume features have been added

; Main work done in the One_mSec_ISR

;========================================================================

; 6/25/97	wmh	v2.1 add features

; changes to allow the code to pass chapter 9 and hidview tests have been

; done.  That meant major rework of the endpoint zero interrupt service

; routine (USB_EP0_ISR).

;========================================================================

; 5/15/97	gwg	v1.1 minor corrections

; I made a couple of changes to the control_read routine.  I deleted the

; redundant I/O write to clear the setup bit in the USB_EP0_RX_Status

; before the "control_read_data_stage".

;

; I also removed an unused jmp after the "wait_control_read" loop that

; could never be executed.

;=======================================================

; 4/28/97	gwg	v1.0 major rewrite

; The mouse code still needs support for suspend and 

; remote wakeup.

;**************** assembler directives ***************** 

label:          XPAGEON

		

; I/O ports

Port0_Data:            equ     00h      ; GPIO data port 0

Port1_Data:            equ     01h      ; GPIO data port 1

Port0_Interrupt:       equ     04h      ; Interrupt enable for port 0

Port1_Interrupt:       equ     05h      ; Interrupt enable for port 1

Port0_Pullup:          equ     08h      ; Pullup resistor control for port 0

Port1_Pullup:          equ     09h      ; Pullup resistor control for port 1



; USB ports

USB_EP0_TX_Config:      equ     10h     ; USB EP0 transmit configuration

USB_EP1_TX_Config:      equ     11h     ; USB EP1 transmit configuration

USB_Device_Address:     equ     12h     ; USB device address assigned by host

USB_Status_Control:     equ     13h     ; USB status and control register

USB_EP0_RX_Status:      equ     14h     ; USB EP0 receive status



; control ports

Global_Interrupt:       equ     20h     ; Global interrupt enable

Watchdog:               equ     21h     ; clear watchdog Timer

Cext:				equ 	  22h	    ; Cext register

Timer:                  equ     23h     ; free-running Timer



; GPIO Isink registers

Port0_Isink:            equ     30h

Port0_Isink0:           equ     30h

Port0_Isink1:           equ     31h

Port0_Isink2:           equ     32h

Port0_Isink3:           equ     33h

Port0_Isink4:           equ     34h

Port0_Isink5:           equ     35h

Port0_Isink6:           equ     36h

Port0_Isink7:           equ     37h



Port1_Isink:            equ     38h

Port1_Isink0:           equ     38h

Port1_Isink1:           equ     39h

Port1_Isink2:           equ     3Ah

Port1_Isink3:           equ     3Bh



; control port

Status_Control:         equ     FFh	; Processor Status and Control



;**********  Register constants  ************************************

; Processor Status and Control

RunBit:			equ	 1h		; CPU Run bit

SuspendBits:		equ    9h		; Run and suspend bits set

PowerOnReset:		equ   10h		; Power on reset bit

USBReset:			equ	20h		; USB Bus Reset bit

WatchDogReset:		equ	40h		; Watchdog Reset bit



; USB Status and Control

BusActivity:		equ	 1h		; USB bus activity bit

ForceResume:		equ	 3h		; force resume to host



; interrupt masks

TIMER_ONLY:			equ	 4h		; one msec timer



ENUMERATE_MASK:		equ	0Ch		; one msec timer 	

							; USB EP0 interrupt



RUNTIME_MASK:		equ   1Ch     	; one msec timer

							; USB EP0 interrupt

							; USB EP1 interrupt



WAKEUP_MASK:		equ	80h		; Cext wakeup interrupt



; USB EP1 transmit configuration

DataToggle:		equ	40h			; Data 0/1 bit



; Phototransistor and LED current values

Ptr_Current: 	equ 	07h			; port0 current setting for PTR

LED_Current: 	equ 	0fh			; port1 current setting for LED



; The procedure to set or choose the PTR and LED current values is :

;  1) Program test chip with values shown above.

;  2) Insert into board with typical LED and PTRs.

;  3) Plug into USB computer to activate mouse. 

;  4) Using an oscilloscope on the GPIO Port 0 pins, spin

;     the mouse wheel. Observe transitions on PTR pins. Signal

;     should swing full scale, with ~50% duty cycle when the 

;     wheel is moving.

;  5) If signal is "High" for > 50% of the time when wheel is

;     moving, reduce the LED_Current value and repeat from step

;     1. If the signal is "Low" for > 50% of the time, increase

;     the LED_Current value and repeat. (Alternately, Ptr_Current

;     could increased / decreased.)

;  6) Settings are proper when duty cycle is approximately 50% 

;     on all pins.





;========================================================================

; constant declarations

;========================================================================

; from USB Spec v1.0 from page 175

;------------------------------------------------------------------------

; standard request codes

get_status:             equ   0

clear_feature:          equ   1

set_feature:            equ   3

set_address:            equ   5

get_descriptor:         equ   6

set_descriptor:         equ   7

get_configuration:      equ   8

set_configuration:      equ   9

get_interface:          equ  10 

set_interface:          equ  11 

synch_frame:            equ  12



; standard descriptor types

device:         	equ  1

configuration:  	equ  2

string:         	equ  3

interface:      	equ  4

endpoint:       	equ  5



; standard feature selectors

endpoint_stalled:       equ  0		; recipient endpoint

device_remote_wakeup:   equ  1		; recipient device

 

;========================================================================

; from HID Class v1.0 Draft #4

;------------------------------------------------------------------------

; class specific descriptor types from section 7.1 Standard Requests

HID:                    equ  21h

report:                 equ  22h

physical:               equ  23h

  

; class specific request codes from section 7.2 Class Specific Requests

get_report:             equ   1

get_idle:               equ   2

get_protocol:           equ   3

set_report:             equ   9

set_idle:               equ  10

set_protocol:           equ  11



;========================================================================

; USB packet constants (debug purposes)

;------------------------------------------------------------------------

setup:          	equ  B4h

in:             	equ  96h

out:            	equ  87h

data0:          	equ  C3h

data1:          	equ  D2h

ack:            	equ  4Bh

nak:            	equ  5Ah



DISABLE_REMOTE_WAKEUP:  equ   0         ; bit[1] = 0

ENABLE_REMOTE_WAKEUP:   equ   2         ; bit[1] = 1



BOOT_PROTOCOL:		equ	0		; bit[0] = 0

REPORT_PROTOCOL:		equ	1		; bit[0] = 1



;========================================================================

; data variable assignments

;========================================================================



; control endpoint 0 fifo

endpoint_0:             equ  70h	; control endpoint



; definitions for SETUP packets

bmRequestType:          equ  70h

bRequest:               equ  71h

wValue:                 equ  72h        ; default wValue (8-bits)

wValueHi:               equ  73h

wIndex:                 equ  74h        ; default wIndex (8-bits)

wIndexHi:               equ  75h

wLength:                equ  76h        ; default wLength (8-bits)

wLengthHi:              equ  77h

 



; interrupt endpoint 1 fifo

endpoint_1:             equ  78h

button_position:		equ  78h

horiz_position:        	equ  79h

vert_position:         	equ  7Ah



;------------------------------------------------------------------------

; data memory variables

; To support the USB specification.

;------------------------------------------------------------------------

interrupt_mask:		equ  20h

port_temp:			equ  21h

endp0_data_toggle: 	equ  22h

loop_counter:		equ  23h

horiz_state:		equ  24h

vert_state:			equ  25h

data_start:			equ  26h

data_count:			equ  27h

endpoint_stall:		equ  28h



remote_wakeup_status:   equ  29h        	; remote wakeup request

							; zero is disabled

							; two is enabled

configuration_status:   equ  2Ah        	; configuration status

							; zero is unconfigured

							; one is configured

;idle_status:           equ  2Bh        	; support SetIdle and GetIdle

protocol_status:      	equ  2Ch        	; zero is boot protocol

							; one is report protocol

suspend_counter:		equ  2Dh		; contains number of idle bus msecs 

wakeup_counter: 		equ  2Eh		; used for 10msec count by Wakeup 

wakeup_flag:		equ  2Fh		; used to indicate wakeup process 

disch_counter:		equ  30h		; used to discharge the capacitor

report_buffer:		equ  31h          ; used by GetReport

                                          ; order must be buttons,horizontal,vertical

buttons:			equ  31h		

horizontal:			equ  32h		

vertical:			equ  33h

button_flag:		equ  34h

button1_deb:		equ  35h		; debouncing register 

new_idle_period:        equ  36h          ; used for idle period(ms)

prev_idle_period:       equ  37h          ; used to save the previous idle period

idle_period:            equ  38h  

idle_period_counter:    equ  39h

4ms_counter:            equ  40h          ; used to count 4ms in 1 ms routine

new_idle_flag:          equ  41h          ; used to signal a new idle period



;*************** interrupt vector table ****************



ORG 	00h			



jmp	Reset				; reset vector		



jmp	DoNothing_ISR		; 128us interrupt



jmp	One_mSec_ISR		; 1024ms interrupt



jmp	USB_EP0_ISR  		; endpoint 0 interrupt



jmp	USB_EP1_ISR 		; endpoint 1 interrupt



jmp	Reset				; reserved interrupt



jmp	DoNothing_ISR		; general purpose I/0 interrupt



jmp	Wakeup_ISR			; wakeup or resume interrupt





;************** program listing ************************



ORG  10h

;*******************************************************

; The 128 uSec interrupt is not used by the mouse code.

; If this interrupt occurs, do nothing except re-enable

; interrupts.

; The GPIO interrupts are not used in this version of

; the firmware.

; The Wakeup interupt is not used, either in this version.

DoNothing_ISR:

	push A

  	mov A, [interrupt_mask]

	ipret Global_Interrupt

	

;*******************************************************

; The Wakeup interrupt is used to force the host to 

; resume due to a mouse movement or a button press

Wakeup_ISR:

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品免费观看| 国产一区二区三区四区五区美女 | 亚洲午夜激情av| 精品国产伦一区二区三区观看方式 | 日韩av一区二区三区四区| 日本一区二区三区四区| 欧美另类高清zo欧美| 成人午夜精品在线| 久久99国产精品久久99 | 亚洲精品视频免费观看| 久久亚洲精精品中文字幕早川悠里| 在线一区二区视频| 成人午夜私人影院| 久久99精品久久久久| 亚洲成人一区二区在线观看| 国产在线精品不卡| 亚洲电影一区二区| 亚洲桃色在线一区| 国产色婷婷亚洲99精品小说| 欧美一级久久久| 欧美日韩欧美一区二区| 91首页免费视频| 高清视频一区二区| 亚洲免费在线播放| 国产精品乱人伦| 国产无一区二区| 久久久欧美精品sm网站| 日韩欧美一二三四区| 欧美日韩视频一区二区| 欧美三级一区二区| 色狠狠av一区二区三区| 91免费小视频| 99久久精品国产观看| 成人伦理片在线| 波波电影院一区二区三区| 懂色av一区二区三区蜜臀| 国产精品一级二级三级| 国产伦理精品不卡| 国产一区亚洲一区| 国产福利91精品| 国产99久久久久| av网站免费线看精品| 99久久精品国产导航| 色婷婷综合久久久久中文 | 青青草国产成人99久久| 蜜臀久久99精品久久久画质超高清| 午夜av一区二区三区| 日韩高清不卡一区| 美女爽到高潮91| 国产一区二区91| 成人一区二区三区在线观看 | 国产一区二区三区最好精华液| 韩国理伦片一区二区三区在线播放| 激情小说亚洲一区| 国产成人av一区二区| a级高清视频欧美日韩| 色综合久久中文字幕| 欧美色图在线观看| 91精品国产色综合久久ai换脸| 日韩精品一区二区三区老鸭窝| 精品国产一区二区三区久久久蜜月 | www.在线欧美| 在线亚洲欧美专区二区| 在线综合亚洲欧美在线视频 | 亚洲国产欧美日韩另类综合 | 国产一区二区三区在线观看免费 | 精品国产免费一区二区三区香蕉 | 亚洲欧美日韩一区二区三区在线观看| 亚洲综合一二三区| 日韩福利电影在线| 国产成人精品亚洲777人妖| 91蝌蚪porny成人天涯| 宅男噜噜噜66一区二区66| 国产亚洲一二三区| 一区二区三区中文在线| 美女国产一区二区三区| k8久久久一区二区三区| 欧美日韩精品三区| 亚洲国产高清不卡| 亚洲成人1区2区| 国产自产v一区二区三区c| 精品国产1区二区| 中文字幕一区二区三区四区不卡| 亚洲最新在线观看| 国产尤物一区二区| 欧美日韩免费在线视频| 久久久亚洲午夜电影| 亚洲一区二区三区免费视频| 激情综合色综合久久综合| 色噜噜偷拍精品综合在线| 欧美成人精品1314www| 亚洲女与黑人做爰| 国产最新精品免费| 在线视频欧美区| 国产日韩欧美亚洲| 免费看日韩精品| 91色在线porny| 久久久久久97三级| 日韩高清一区在线| 91久久精品国产91性色tv| 国产丝袜在线精品| 久久av资源网| 欧美精品成人一区二区三区四区| 亚洲欧洲日产国产综合网| 麻豆国产精品一区二区三区 | 不卡一区在线观看| 欧美精品一区二区高清在线观看| 亚洲一级不卡视频| 99国产欧美久久久精品| 久久久久9999亚洲精品| 老色鬼精品视频在线观看播放| 在线观看视频91| 1000精品久久久久久久久| 国产一区欧美日韩| 日韩欧美色综合| 婷婷开心久久网| 欧美做爰猛烈大尺度电影无法无天| 国产欧美精品在线观看| 韩国精品一区二区| 精品欧美黑人一区二区三区| 午夜一区二区三区视频| 日本电影欧美片| 中文字幕亚洲在| 不卡视频一二三| 中文字幕久久午夜不卡| 国产91丝袜在线播放| 久久综合色婷婷| 精品夜夜嗨av一区二区三区| 欧美精选午夜久久久乱码6080| 亚洲精品视频在线| 91国偷自产一区二区三区观看| 国产精品热久久久久夜色精品三区 | 国产亚洲综合色| 国产精品一卡二卡在线观看| 久久综合色鬼综合色| 国产一区二区三区在线看麻豆| 亚洲成a人片在线不卡一二三区| 97成人超碰视| 亚洲精品国久久99热| 色中色一区二区| 亚洲国产另类av| 欧美伦理视频网站| 美国欧美日韩国产在线播放| 日韩一级免费观看| 久国产精品韩国三级视频| 精品国产乱码久久久久久久久| 久久99精品久久久久婷婷| 久久久久久麻豆| 成人av午夜电影| 亚洲欧美区自拍先锋| 欧美日韩综合色| 奇米影视在线99精品| 欧美精品一区二区三区很污很色的| 国产伦精品一区二区三区在线观看 | 国产一区二区视频在线| 国产拍揄自揄精品视频麻豆| bt欧美亚洲午夜电影天堂| 亚洲精品国产无套在线观| 欧美性大战久久久久久久蜜臀 | 一区二区三区av电影| 欧美三级电影在线看| 免费观看91视频大全| 国产三区在线成人av| 91香蕉国产在线观看软件| 亚洲国产精品一区二区www在线| 欧美一区二区国产| 国产黑丝在线一区二区三区| 一区免费观看视频| 欧美另类z0zxhd电影| 黄页网站大全一区二区| 日韩毛片在线免费观看| 91精品啪在线观看国产60岁| 国产一区二区看久久| 亚洲视频一区二区在线观看| 欧美乱妇15p| 粉嫩绯色av一区二区在线观看| 一区二区欧美视频| 欧美成人精精品一区二区频| av一区二区三区四区| 日韩黄色免费电影| 中文字幕av资源一区| 欧美肥大bbwbbw高潮| 成人深夜视频在线观看| 视频一区中文字幕| 国产精品三级av| 91精品国产免费| av午夜一区麻豆| 精品亚洲成av人在线观看| 一区二区成人在线视频| 久久久久久一二三区| 欧美日韩亚洲综合一区| 成人一区二区三区视频 | 亚洲成人精品影院| 久久午夜国产精品| 欧美日韩mp4| www.欧美日韩国产在线| 久久国内精品自在自线400部| 一区二区三区日韩欧美| 久久久99精品久久| 制服丝袜日韩国产|