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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mouse45b.asm

?? USB大全電子版全部資料3~包含源碼、協議等
?? 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:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
紧缚奴在线一区二区三区| 一区二区三区美女| 在线播放国产精品二区一二区四区| 成人爽a毛片一区二区免费| 国产在线看一区| 麻豆国产精品一区二区三区| 人禽交欧美网站| 看片网站欧美日韩| 激情综合亚洲精品| 国产一区二区三区四区五区入口| 韩国精品一区二区| 国产乱子轮精品视频| 成人综合激情网| 99re成人精品视频| 欧美人动与zoxxxx乱| 91麻豆精品国产91久久久使用方法 | 亚洲欧洲一区二区三区| 亚洲精品你懂的| 欧美aaa在线| 国产99久久精品| 91精彩视频在线| 欧美一区二区三区白人| 精品国产免费人成电影在线观看四季 | 综合婷婷亚洲小说| 亚洲一区电影777| 蜜臀va亚洲va欧美va天堂| 国产在线看一区| 91传媒视频在线播放| 日韩欧美第一区| 国产精品传媒在线| 奇米影视一区二区三区| 国产精品77777竹菊影视小说| 色就色 综合激情| 精品久久久久久久久久久久久久久久久 | 欧洲另类一二三四区| 日韩精品一区二区三区视频播放| 国产精品情趣视频| 爽好多水快深点欧美视频| 国产91丝袜在线播放九色| 欧美图区在线视频| 国产丝袜欧美中文另类| 亚洲第一久久影院| 成人激情动漫在线观看| 欧美大片日本大片免费观看| 亚洲激情六月丁香| 风流少妇一区二区| 日韩精品一区二区三区三区免费 | fc2成人免费人成在线观看播放| 欧美另类高清zo欧美| 亚洲欧美在线高清| 国产一区二区精品在线观看| 欧美精品一二三| 一区二区三区在线影院| 大白屁股一区二区视频| 精品国产一区二区在线观看| 日日摸夜夜添夜夜添精品视频 | 欧美精品tushy高清| 国产精品久久久久久久久动漫| 麻豆精品新av中文字幕| 欧美久久久一区| 亚洲成人三级小说| 色久优优欧美色久优优| 中文字幕一区二区三区精华液 | 国产成人免费在线| 精品国产乱码久久久久久久久| 无码av中文一区二区三区桃花岛| 99热在这里有精品免费| 国产欧美日韩精品在线| 国产福利一区二区三区在线视频| 欧美xxxxxxxx| 国产一区二区精品久久91| 精品国产乱码久久| 毛片av一区二区| 精品久久久久久综合日本欧美| 久久国产精品99久久人人澡| 欧美电影免费观看高清完整版在| 久久机这里只有精品| 日韩一区二区在线看片| 激情久久五月天| 久久日韩粉嫩一区二区三区 | 亚洲色图另类专区| 一本大道久久a久久精二百 | 中文字幕欧美激情一区| 豆国产96在线|亚洲| 亚洲视频一二三区| 欧美在线观看视频在线| 午夜精品免费在线观看| 欧美一区二区三区白人| 国产在线观看一区二区| 久久精品夜色噜噜亚洲a∨| 国产·精品毛片| 一区二区三区精品在线| 欧美一区二区视频在线观看| 国内国产精品久久| 亚洲少妇屁股交4| 欧美日产在线观看| 国产精品自产自拍| 亚洲人成小说网站色在线| 欧美日韩国产综合一区二区| 狠狠色丁香婷婷综合| 国产精品国产三级国产aⅴ中文 | 91丨porny丨户外露出| 亚洲午夜激情av| 精品福利av导航| 一本久久综合亚洲鲁鲁五月天| 亚洲成人免费观看| 国产亚洲精品中文字幕| 欧美最新大片在线看| 国模少妇一区二区三区| 亚洲色图在线看| 精品精品欲导航| 在线精品亚洲一区二区不卡| 国模一区二区三区白浆| 亚洲美女在线一区| 久久亚洲捆绑美女| 欧美三级在线看| 成人白浆超碰人人人人| 免费人成黄页网站在线一区二区| 国产精品成人在线观看| 日韩欧美在线123| 在线观看日韩毛片| 成熟亚洲日本毛茸茸凸凹| 日本不卡免费在线视频| 亚洲乱码中文字幕综合| 久久精品一区二区三区不卡牛牛| 欧美日韩国产综合草草| 91香蕉视频mp4| 国产激情视频一区二区三区欧美| 天天影视涩香欲综合网| 亚洲欧美日韩在线| 中文成人综合网| 精品少妇一区二区三区日产乱码 | 亚洲三级电影网站| 精品福利视频一区二区三区| 欧美老肥妇做.爰bbww视频| 91在线小视频| 成人av电影在线| 国产盗摄一区二区| 国产精品中文欧美| 精品夜夜嗨av一区二区三区| 午夜视频在线观看一区二区| 亚洲精品日日夜夜| 18成人在线观看| 中文字幕精品一区 | 欧美主播一区二区三区美女| youjizz久久| 91免费精品国自产拍在线不卡| 国产传媒一区在线| 国产传媒日韩欧美成人| 国产精品亚洲综合一区在线观看| 极品销魂美女一区二区三区| 极品少妇一区二区三区精品视频 | 精品国产免费一区二区三区四区| 91精品国产一区二区人妖| 正在播放亚洲一区| 日韩精品一区在线观看| 精品福利一二区| 国产精品色在线观看| 欧美国产日韩一二三区| 中文字幕人成不卡一区| 椎名由奈av一区二区三区| 亚洲乱码中文字幕综合| 亚洲va韩国va欧美va精品| 青青草视频一区| 久久精品国产色蜜蜜麻豆| 国产在线播放一区三区四| 成人手机在线视频| 欧美综合色免费| 日韩欧美卡一卡二| 久久嫩草精品久久久精品| 国产精品乱人伦| 亚洲国产婷婷综合在线精品| 全国精品久久少妇| 成人免费视频视频在线观看免费| 91影院在线免费观看| 欧美午夜一区二区三区免费大片| 欧美一区二区在线看| 中文字幕免费一区| 亚洲3atv精品一区二区三区| 久久99精品久久久久久国产越南| 成人美女在线观看| 欧美三级电影在线观看| 国产日韩亚洲欧美综合| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 一区二区日韩av| 国产一区二区三区在线观看精品 | 26uuu另类欧美| 中文字幕一区二区在线播放| 日韩激情视频在线观看| 国产.欧美.日韩| 91精品婷婷国产综合久久竹菊| 久久久久国产一区二区三区四区 | 国产精品一区三区| 欧美精品在线一区二区| 中国色在线观看另类| 日本不卡1234视频| 色婷婷国产精品综合在线观看| 91精品国产综合久久久久久久| 亚洲日韩欧美一区二区在线| 国产精品一品二品|