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

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

?? mouse45.asm

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

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色老汉av一区二区三区| 亚洲国产精品久久人人爱| 99久久99久久精品免费观看| 图片区小说区区亚洲影院| 亚洲乱码国产乱码精品精可以看 | 一本大道久久精品懂色aⅴ| 久久97超碰色| 久久99精品国产麻豆不卡| 91视频国产观看| 91麻豆蜜桃一区二区三区| 精品少妇一区二区三区 | 日韩欧美国产一区在线观看| 91精品国产色综合久久不卡电影| 欧美日韩亚洲综合| 9191成人精品久久| 精品国产青草久久久久福利| 欧美不卡一区二区| 五月天久久比比资源色| 色香蕉成人二区免费| 国产精品视频一二三| 亚洲美女淫视频| 亚洲午夜精品在线| 99re这里都是精品| 国产精品理论片在线观看| 亚洲午夜激情网页| 色综合久久天天综合网| 国产精品午夜在线观看| 国内不卡的二区三区中文字幕| av午夜一区麻豆| 欧美另类videos死尸| 久久精品在线免费观看| 亚洲精选视频免费看| 91在线观看视频| 亚洲激情一二三区| 日本道色综合久久| 亚洲国产sm捆绑调教视频 | 国产一区二区在线观看免费 | 96av麻豆蜜桃一区二区| 国产精品网曝门| 成人黄页在线观看| 日韩一区二区免费高清| 中文字幕精品三区| 日本不卡一区二区三区| 欧美a级理论片| 日韩欧美电影在线| 国产在线日韩欧美| 国产精品久久久久婷婷二区次| 波多野结衣视频一区| 亚洲天堂福利av| 高清beeg欧美| 欧美成人video| 国产91丝袜在线播放0| 国产精品久久看| 欧美视频三区在线播放| 国产精品青草综合久久久久99| www.综合网.com| 亚洲五月六月丁香激情| 欧美电视剧免费观看| 国产毛片精品视频| 国产精品成人一区二区三区夜夜夜 | 自拍偷自拍亚洲精品播放| 日本精品视频一区二区三区| 日韩成人免费在线| 日本一区二区高清| 欧美系列亚洲系列| 国产一区二三区| 一区二区三区四区在线免费观看 | 久久午夜电影网| 美洲天堂一区二卡三卡四卡视频| 欧美日韩综合色| 国内久久精品视频| 樱桃国产成人精品视频| 日韩精品自拍偷拍| 欧美精品欧美精品系列| 国产盗摄一区二区三区| 91麻豆精品国产91久久久 | 国产肉丝袜一区二区| 国产制服丝袜一区| 亚洲激情在线播放| 国产日韩一级二级三级| 欧美日韩成人在线| 免费看日韩精品| 亚洲欧美日韩系列| www国产亚洲精品久久麻豆| 在线免费av一区| 无吗不卡中文字幕| 国产精品无遮挡| 精品对白一区国产伦| 欧美日韩一区三区| 97精品国产露脸对白| 国产专区综合网| 日韩主播视频在线| 精品国产网站在线观看| 欧美视频第二页| 91丨国产丨九色丨pron| 国产91清纯白嫩初高中在线观看 | 亚洲主播在线观看| 日韩欧美成人午夜| 欧美日韩亚洲综合一区二区三区| 成人免费黄色大片| 亚洲成人av一区| 久久新电视剧免费观看| 欧美日韩高清一区二区| 色综合中文综合网| 在线播放/欧美激情| 色婷婷av一区二区三区软件 | 欧美国产日本视频| 久久午夜羞羞影院免费观看| 日韩欧美一级二级三级久久久| 欧美日韩一级片在线观看| 色综合天天狠狠| 91欧美一区二区| av综合在线播放| 91蝌蚪porny成人天涯| 99视频精品在线| av男人天堂一区| 成人av电影观看| 99精品视频一区二区| 9l国产精品久久久久麻豆| 成人av电影在线观看| 波多野结衣欧美| 91豆麻精品91久久久久久| 色综合欧美在线| 欧美日韩一区精品| 91麻豆精品国产91久久久久 | 欧美视频完全免费看| 91久久国产综合久久| 欧美天堂一区二区三区| 欧美精品久久99久久在免费线 | av网站免费线看精品| av午夜一区麻豆| 欧美伊人久久久久久久久影院| 欧美亚洲动漫精品| 日韩一区二区在线看| 精品国产乱码久久久久久久久 | 精品免费日韩av| 欧美激情中文不卡| 中文字幕中文乱码欧美一区二区 | 色94色欧美sute亚洲线路二| 欧美日韩国产首页| 精品国产一区a| 国产精品第一页第二页第三页| 亚洲综合另类小说| 蜜桃传媒麻豆第一区在线观看| 国产毛片精品一区| 在线观看国产日韩| 日韩精品一区二区三区视频播放| 欧美韩国一区二区| 亚洲成人资源网| 国产精品亚洲专一区二区三区| 亚洲图片自拍偷拍| 久久99精品久久久久婷婷| 成人综合激情网| 欧美日韩aaa| 国产欧美日韩在线| 成人短视频下载| 色哟哟亚洲精品| 91精品国产综合久久福利软件| 久久久影视传媒| 91精品国产91久久久久久最新毛片 | 欧美日韩不卡在线| 国产日韩av一区| 日日夜夜一区二区| 波多野结衣欧美| 欧美tickle裸体挠脚心vk| 国产精品国产三级国产普通话99| 亚洲成精国产精品女| 成人激情免费电影网址| 欧美一区二区三区思思人| 国产精品不卡视频| 精品一区在线看| 欧美色精品在线视频| 国产精品热久久久久夜色精品三区| 午夜精品久久久久久久99水蜜桃| 高清在线不卡av| 欧美精品一区二区久久久| 亚洲午夜三级在线| 91精品国产综合久久福利| 亚洲高清免费观看| 国产精品羞羞答答xxdd| 欧美日免费三级在线| 亚洲欧美自拍偷拍色图| 国产欧美日韩另类一区| 日韩在线观看一区二区| 欧美亚洲综合网| 亚洲视频一区二区免费在线观看 | 国产日产欧美一区| 日本视频一区二区| 欧美日韩亚洲综合| 一区二区三区丝袜| 97久久超碰精品国产| 国产精品午夜免费| 成人综合在线观看| 日本一区二区三区国色天香| 国产制服丝袜一区| 欧美tickling网站挠脚心| 美女脱光内衣内裤视频久久影院| 欧美日韩中文另类| 一区二区三国产精华液| 成人在线综合网|