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

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

?? mouse45.asm

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

;				Cypress Semiconductor

; 			Mouse Demonstration Design Kit Firmware 

;

; Features :

; Threee 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.

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

; 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:

	push A

	mov A, 0h					; clear Cext ( Discharge Capacitor )

	iowr Cext

	mov A, 0f0h					; turn on the phototransistors

	iowr Port0_Data			

	mov A, 0feh             		; turn on the LED on Port 1 bit[0]

	iowr Port1_Data

	mov A, FFh

	mov [disch_counter], A

delay2:

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区不卡| 91啪九色porn原创视频在线观看| 欧美在线不卡视频| 亚洲小说欧美激情另类| 欧美中文一区二区三区| 五月天中文字幕一区二区| 欧美精品一卡二卡| 久久 天天综合| 国产午夜精品一区二区三区嫩草 | 亚洲欧美日韩在线| 色天天综合色天天久久| 亚洲制服丝袜在线| 欧美高清性hdvideosex| 精品一区二区在线看| 欧美激情在线看| 欧日韩精品视频| 久久超碰97中文字幕| 久久久亚洲精品一区二区三区| 丁香婷婷深情五月亚洲| 一区二区三区丝袜| 精品美女一区二区| 99视频超级精品| 视频一区二区三区入口| 亚洲精品一区二区三区福利| av在线播放成人| 日韩不卡一区二区三区| 国产欧美日韩不卡| 欧美日韩激情一区二区三区| 精品午夜久久福利影院| 亚洲视频网在线直播| 日韩写真欧美这视频| 成人h动漫精品一区二区| 五月开心婷婷久久| 中文字幕乱码久久午夜不卡| 欧美午夜精品一区| 国产精品66部| 日韩和的一区二区| 亚洲欧洲av另类| 日韩视频国产视频| 色婷婷av一区| 国产不卡免费视频| 奇米色一区二区| 亚洲女爱视频在线| 久久久蜜臀国产一区二区| 在线免费一区三区| 成人精品国产福利| 色综合夜色一区| 久久不见久久见中文字幕免费| 亚洲美女淫视频| 国产欧美日韩精品a在线观看| 欧美日本乱大交xxxxx| av爱爱亚洲一区| 国产美女精品人人做人人爽| 亚洲电影你懂得| 亚洲欧洲一区二区三区| 久久这里都是精品| 欧美一区二区大片| 欧美日韩成人在线| 日本韩国欧美在线| 不卡视频一二三| 国产成人综合在线| 久久精品久久综合| 免费观看一级特黄欧美大片| 亚洲一区二区黄色| 亚洲精品综合在线| 亚洲色图.com| 亚洲欧美综合色| 国产精品乱人伦中文| 久久精品综合网| 精品成人私密视频| 亚洲精品一区在线观看| 日韩欧美一区二区免费| 欧美高清视频一二三区| 欧美日韩三级在线| 欧美日韩一区二区三区四区五区| 色婷婷精品大视频在线蜜桃视频| 成人高清免费在线播放| 成人av资源站| 99免费精品在线观看| 成人aa视频在线观看| av网站免费线看精品| 99久久久精品免费观看国产蜜| 粉嫩高潮美女一区二区三区| 国产91对白在线观看九色| 国产99久久久国产精品潘金| 国产91精品精华液一区二区三区| 精品国产亚洲一区二区三区在线观看| 欧美日韩精品一区二区天天拍小说| 91极品美女在线| 欧美午夜视频网站| 欧美久久一二区| 91精品国产综合久久精品| 91精品国产91久久久久久一区二区| 91麻豆精品国产综合久久久久久| 欧美一区午夜视频在线观看| 精品少妇一区二区三区免费观看| 亚洲精品一区二区精华| 国产精品美女久久久久久久 | 欧美一区二区国产| 欧美成人一区二区三区片免费 | 激情深爱一区二区| 国产高清亚洲一区| youjizz久久| 欧美日韩一区三区| 日韩精品专区在线| 国产丝袜美腿一区二区三区| 中文字幕日韩一区二区| 亚洲主播在线观看| 精品一区二区日韩| 高清国产一区二区三区| 色妞www精品视频| 欧美图片一区二区三区| 欧美v国产在线一区二区三区| 久久美女高清视频| 亚洲综合无码一区二区| 国产在线日韩欧美| 日本久久电影网| 日韩精品一区二区三区视频| 日本一区二区视频在线| 亚洲国产精品综合小说图片区| 久久99这里只有精品| 成人app网站| 日韩亚洲欧美在线观看| 日韩毛片一二三区| 麻豆久久久久久久| 在线视频综合导航| 精品sm在线观看| 亚洲午夜久久久久中文字幕久| 国产一区二区三区在线观看免费视频| 91福利资源站| 国产欧美日本一区二区三区| 午夜欧美2019年伦理| 成人黄色av电影| 欧美电影免费提供在线观看| 中文字幕欧美一| 国产美女精品人人做人人爽| 欧美日韩国产高清一区| 中文字幕 久热精品 视频在线 | 欧美高清精品3d| 欧美国产欧美亚州国产日韩mv天天看完整 | 一区二区三区欧美日韩| 国内精品第一页| 欧美精品三级日韩久久| 亚洲色图在线看| 国产69精品久久99不卡| 欧美成人精品二区三区99精品| 亚洲一二三四在线观看| 成人久久久精品乱码一区二区三区| 91精品国产黑色紧身裤美女| 一区二区三区日韩| 97久久久精品综合88久久| 久久夜色精品国产噜噜av| 奇米888四色在线精品| 欧美日韩免费高清一区色橹橹| 亚洲欧洲精品一区二区三区不卡 | 国产盗摄视频一区二区三区| 欧美精品一级二级| 亚洲图片欧美色图| 欧美在线观看一区二区| 亚洲欧美另类图片小说| 99久久久精品| 中文字幕色av一区二区三区| 成人精品gif动图一区| 国产亚洲精品精华液| 国产乱人伦偷精品视频不卡| 精品久久久久一区| 久久99精品一区二区三区 | 日本中文一区二区三区| 欧美日韩精品欧美日韩精品一| 亚洲自拍偷拍图区| 色视频欧美一区二区三区| 亚洲精品美国一| 日本高清免费不卡视频| 亚洲精品自拍动漫在线| 欧美在线观看视频一区二区三区| 亚洲主播在线观看| 欧美色综合网站| 午夜一区二区三区在线观看| 欧美日韩卡一卡二| 青青草精品视频| 日韩欧美一区二区不卡| 久久丁香综合五月国产三级网站 | 久久99最新地址| 日韩精品一区二区三区视频播放| 韩国三级电影一区二区| 国产丝袜在线精品| 97aⅴ精品视频一二三区| 亚洲私人黄色宅男| 欧美色老头old∨ideo| 蜜臀av性久久久久蜜臀aⅴ| 亚洲精品一线二线三线| 成人国产亚洲欧美成人综合网| 亚洲欧美日韩综合aⅴ视频| 欧美系列日韩一区| 奇米精品一区二区三区四区| 国产亚洲欧美中文| 色婷婷精品久久二区二区蜜臀av| 日韩精品一卡二卡三卡四卡无卡| 精品国产一区二区三区四区四 | 国产成人精品午夜视频免费|