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

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

?? mouse45.asm

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

; This one is not in the spec, but has been captured with CATC while

; Memphis beta testing. 

RequestType22:

      mov A, [bRequest] 	; load bRequest

; Set Report			bRequest = 9

	cmp A, set_report

	jz SetReport

; Set Idle				bRequest = 10

      cmp A, set_idle

      jz SetIdle

; Set Protocol			bRequest = 11

      cmp A, set_protocol

      jz SetProtocol

	jmp SendStall		; stall unsupported functions



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

; device to host with endpoint as recipient

RequestTypeA1:

        mov A, [bRequest] 	; load bRequest

; Get Report			bRequest = 1

        cmp A, get_report

        jz GetReport

; Get Idle				bRequest = 2

        cmp A, get_idle

        jz GetIdle

; Get Protocol			bRequest = 3

        cmp A, get_protocol

        jz GetProtocol

        jmp SendStall        	; stall unsupported functions



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

; This one is not in the spec, but has been captured with CATC while

; Memphis beta testing. 

RequestTypeA2:

        mov A, [bRequest] 	; load bRequest

; Get Report			bRequest = 1

        cmp A, get_report

        jz GetReport

; Get Idle				bRequest = 2

        cmp A, get_idle

        jz GetIdle

; Get Protocol			bRequest = 3

        cmp A, get_protocol

        jz GetProtocol

        jmp SendStall        	; stall unsupported functions



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

;       stage three ... process the request

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

; Remote wakeup is the ability to wakeup a system from power down mode

; when the user presses a key or moves a mouse.  These routines

; allow the host to enable/disable the ability to request remote wakeup.

;

; Disable the remote wakeup capability.

ClearRemoteWakeup:

        mov A, [wValue]                 ; load wValue

        cmp A, device_remote_wakeup     ; test for valid feature

        jnz SendStall                   ; stall unsupported features

        call no_data_control            ; handshake with host

        mov A, DISABLE_REMOTE_WAKEUP    ; disable remote wakeup

        mov [remote_wakeup_status], A

        ret                             ; return



; Enable the remote wakeup capability.

SetRemoteWakeup:

        mov A, [wValue]                 ; load wValue

        cmp A, device_remote_wakeup     ; test for valid feature

        jnz SendStall                   ; stall unsupported features

        call no_data_control            ; handshake with host

        mov A, ENABLE_REMOTE_WAKEUP     ; enable remote wakeup

        mov [remote_wakeup_status], A

        ret                             ; return



; Set the device address to the wValue in the SETUP packet at

; the completion of the current transaction.

SetAddress:

        call no_data_control            ; handshake with host

        mov A, [wValue]                 ; load wValue 

        iowr USB_Device_Address         ; write new USB device address

        ret                             ; return



; Set the configuration of the device to either unconfigured (0) or

; configured (1) based on wValue in the SETUP packet.  According to

; the USB spec (page 178), a Set Configuration also clears the endpoint

; stall condition and re-initializes endpoints using data 0/1 toggle to

; Data0.

SetConfiguration:

      call no_data_control

	mov A, [wValue]				; load wValue lsb

      mov [configuration_status], A   	; store configuration byte

      mov A, 0

      mov [endpoint_stall], A  		; not stalled

      iord USB_EP1_TX_Config          	; clear data 0/1 bit

      and A, ~DataToggle

	iowr USB_EP1_TX_Config	

      mov A, [configuration_status]

      cmp A, 0

	jnz device_configured



; device is unconfigured

	iord USB_EP1_TX_Config

	and A, EFh					; disable endpoint 1

	iowr USB_EP1_TX_Config			  

	mov A, [interrupt_mask]			; disable endpoint one interrupts

	and A, EFh

     	mov [interrupt_mask], A

	jmp done_configuration



; device is configured

device_configured:

	iord USB_EP1_TX_Config		; NAK IN packets until data is 	

	and A,7Fh				; ready on endpoint one

	or A, 10h				; enable endpoint one

	iowr USB_EP1_TX_Config			  

	mov A, [interrupt_mask]		; enable endpoint one interrupts

	or A, 10h

     	mov [interrupt_mask], A

      iord USB_Status_Control		; NAK IN packets until data is 	

	and A,0EFh				; ready on endpoint one

	iowr USB_Status_Control			  

done_configuration:		  

        ret                         ; return



; Clear the endpoint stall feature for the selected endpoint.  This

; should also set the data 0/1 bit to Data0 if endpoint one is selected.

ClearEndpointStall:

        mov A, [wValue]                 ; load wValue (which feature)

        cmp A, endpoint_stalled         ; test for valid feature

        jnz SendStall                   ; stall unsupported features

;

; clear endpoint one stall feature

;

      call no_data_control            	; handshake with host

      mov A,0         

      mov [endpoint_stall], A  		; not stalled

      iord USB_EP1_TX_Config          	; clear data 0/1 bit

      and A, ~DataToggle

	iowr USB_EP1_TX_Config		

      iord USB_Status_Control			; NAK IN packets until data is 	

	and A,0EFh					; ready on endpoint one

	iowr USB_Status_Control			  

      ret                             	; return



; Set the endpoint stall feature for the selected endpoint.

SetEndpointStall:

        mov A, [wValue]                 	; load wValue

        cmp A, endpoint_stalled         	; test for valid feature

        jnz SendStall                   	; stall unsupported features

        call no_data_control            	; handshake with host

        mov A,1         

        mov [endpoint_stall], A  		; stalled

        mov A, 30h                    	; stall endpoint one 

        iowr USB_EP1_TX_Config                 

        ret                             	; return



; The device status is a 16-bit value (two bytes) with only D[1:0]

; defined.  D0=0 specifies bus-powered, which never changes.  D1

; reflects the status of the device_remote_wakeup feature.  This

; feature can either be disabled (D1=0) or enabled (D1=1).

GetDeviceStatus:

        mov A, 2                        		; send two bytes

        mov [data_count], A

        mov A, (get_dev_status_table - control_read_table)

        add A, [remote_wakeup_status]   		; get correct remote wakeup

        jmp execute                     		; send device status to host



; There are five descriptor types.  The descriptor type will be in

; the high byte of wValue.  The descriptor index will be in the low

; byte of wValue.  The standard request to a device supports three

; of these types: device, configuration, and string.  The standard

; request does not support interface or endpoint descriptor types.

GetDescriptor:

        mov A, [wValueHi]               ; load descriptor type

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

; Test for standard descriptor types first.

; Get Descriptor (device)               wValueHi = 1

	cmp A, device

      jz GetDeviceDescriptor

; Get Descriptor (configuration)        wValueHi = 2

	cmp A, configuration

      jz GetConfigurationDescriptor

; Get Descriptor (string)               wValueHi = 3

	cmp A, string

	jz GetStringDescriptor

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

; Then test for HID class descriptor types.

; Get Descriptor (HID)                  wValueHi = 21h

        cmp A, HID

        jz GetHIDDescriptor

; Get Descriptor (report)               wValueHi = 22h  

	cmp A, report

	jz GetReportDescriptor

; Get Descriptor (physical)             wValueHi = 23h  *** not supported ***

	jmp SendStall			    ; stall unsupported functions



; Return the current device configuration to the host.  The possible

; values are zero (unconfigured) and one (configured).

GetConfiguration:

        mov A, 1                        ; send one byte

        mov [data_count], A

        mov A, (get_configuration_status_table - control_read_table)

        add A, [configuration_status]   ; get correct configuration

        jmp execute                     ; send configuration to host



; The interface status is a 16-bit value (two bytes) that is always

; zero for both bytes.

GetInterfaceStatus:

        mov A, 2                        ; send two bytes

        mov [data_count], A

        mov A, (get_interface_status_table - control_read_table)

        jmp execute                     ; send interface status to host



; The endpoint status is a 16-bit value (two bytes) with only one

; bit (D0) defined.  If D0=0, then the selected endpoint is not

; stalled.  If D0=1, then the selected endpoint is stalled.

GetEndpointStatus:

        mov A, 2                        ; send two bytes

        mov [data_count], A

        mov A, [endpoint_stall]

        asl A                           ; select the correct entry

        add A, (get_endpoint_status_table - control_read_table)

        jmp execute                     ; send endpoint status to host



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

; Set Report   

SetReport:

	jmp SendStall	; *** not supported ***



; Set Idle silences a particular report on the interrupt pipe until a new

; event occurs or the specified amount of time (wValue) passes.

SetIdle:

        

;      mov A, [idle_period]		

;    	 mov [prev_idle_period], A		; set the previous idle period to the current one



	mov A, [wValueHi]				; load upper byte of wValue

	mov [new_idle_period], A		; copy to new_idle_period

	

	mov A, 0					; if current idle_period is 0 (indefinite)

	cmp A, [idle_period]			; set the idle_period to the new_idle_period

	jz set_new_idle_period

	

	mov A, [idle_period]

	sub A, [idle_period_counter]

	jc set_new_idle_flag			; if idle_period < idle_period_counter then 

							; set new idle flag to true



	cmp A, 2					; if the idle_period - idle_period_counter > 1

	jnc set_new_idle_period			; (i.e. > 4ms), then set idle period to new one

							; otherwise, set the new idle flag to true



set_new_idle_flag:				; set the new_idle_flag to 1 and return

	mov A, 1					; this keeps the current idle period until

	mov [new_idle_flag], A			; the next report is sent to the host

	jmp done_SetIdle	





set_new_idle_period:				

	mov A, [new_idle_period]		; set the current idle period to the new one

	mov [idle_period], A



	dec A						; check if new_idle_period <= idle_period_counter

	cmp A, [idle_period_counter]

	jnc done_SetIdle				; if no, then return

	mov A, 1					; if yes, then set new_idle_flag to true so that

	mov [new_idle_flag], A			; we keep the new idle value after the report is sent



done_SetIdle:

	call no_data_control            ; handshake with host

      ret                             ; return



	



        

; Set Protocol switches between the boot protocol and the report protocol.

; For boot protocol, wValue=0.  For report protocol, wValue=1.

; Note, the mouse firmware does not actually do anything with the

; protocol status, yet.

SetProtocol:

        mov A, [wValue]                 ; load wValue

        mov [protocol_status], A        ; write new protocol value

        call no_data_control            ; handshake with host

        ret                             ; return



; Get Report allows the host to receive a report via the control pipe.

; The report type is specified in the wValue high byte while the low

; byte has a report ID.  

GetReport:

        mov A, 3                        ; three byte

        mov [data_count], A

        mov A,report_buffer

        jmp execute2                    ; send report to host

        

	



GetReportDescriptor:

	mov A, (end_hid_report_desc_table - hid_report_desc_table)

      mov [data_count], A             ; save descriptor length            



	mov A, (hid_report_desc_table - control_read_table)

      call execute                    ; send descriptor to host

;

; Enumeration is complete!  

;

      ret                           ; return





; Get Idle reads the current idle rate for a particular input report.

GetIdle:

        

	  mov A, 1                        ; send one byte

        mov [data_count], A

        mov A, new_idle_period

        jmp execute2                     ; send idle_period to host

        



; Get Protocol sends the current protocol status back to the host.

GetProtocol:

        mov A, 1                        ; send one byte

        mov [data_count], A

        mov A, (get_protocol_status_table - control_read_table)

        add A, [protocol_status]        ; get correct configuration

        jmp execute                     ; send protocol to host

        

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

; Standard Get Descriptor routines

;

; Return the device descriptor to the host.

GetDeviceDescriptor:

        mov A, 0                        ; load the device descriptor length

	  index device_desc_table

        mov [data_count], A             ; save the device descriptor length

        mov A, (device_desc_table - control_read_table)

        jmp execute                     ; send the device descriptor



; Return the configuration, interface, and endpoint descriptors.

GetConfigurationDescriptor:

	mov A, (end_config_desc_table - config_desc_table)

      mov [data_count], A               ; save the descriptor length

	mov A, (config_desc_table - control_read_table)

execute:                                ; send the descriptors

        mov [data_start], A             ; save start index

        call get_descriptor_length      ; correct the descriptor length

        call control_read               ; perform control read function

        ret                             ; return

execute2:                               ; send the descriptors

        mov [data_start], A             ; save start index

        call get_descriptor_length      ; correct the descriptor length

        call control_read2              ; perform control read function from 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产999大香线蕉| 欧美色偷偷大香| 日本午夜精品视频在线观看| 一区二区三区欧美日韩| 一区精品在线播放| 国产精品久久免费看| 国产精品久久看| 日韩在线观看一区二区| 精油按摩中文字幕久久| 国产成人午夜高潮毛片| av一区二区三区黑人| 91美女在线看| 精品视频全国免费看| 国产精品日产欧美久久久久| 日韩美女视频一区| 无吗不卡中文字幕| 韩国av一区二区三区四区| 国产伦精品一区二区三区免费 | 国产丝袜欧美中文另类| 国产视频一区二区在线| 日av在线不卡| 国产大片一区二区| 日韩欧美一二区| 综合色天天鬼久久鬼色| 国产高清不卡一区| ww久久中文字幕| 亚洲精品综合在线| 美日韩黄色大片| 菠萝蜜视频在线观看一区| 欧美久久高跟鞋激| 国产女同互慰高潮91漫画| 一区二区三区不卡视频| 97久久超碰精品国产| 欧美一区二区三区在线观看 | 日韩欧美久久一区| 天天亚洲美女在线视频| 欧美日韩久久久| 国产精品剧情在线亚洲| 成人永久免费视频| 日韩一区二区麻豆国产| 亚洲欧美综合色| www.一区二区| 亚洲免费观看高清完整版在线观看 | 精品免费99久久| 亚洲免费在线观看| 欧美亚洲一区二区在线| 亚洲国产成人私人影院tom| 日韩国产精品大片| 777奇米成人网| 亚洲激情六月丁香| 精品视频资源站| 午夜欧美大尺度福利影院在线看| 欧美日韩激情在线| 毛片av一区二区| wwwwxxxxx欧美| 国产精品影视网| 日韩欧美中文一区二区| 久久91精品久久久久久秒播 | 欧美图片一区二区三区| 午夜影院久久久| 一道本成人在线| 中文成人综合网| 日本精品裸体写真集在线观看| 日本一区二区成人| 色就色 综合激情| 蜜桃一区二区三区四区| 国产片一区二区| 欧美做爰猛烈大尺度电影无法无天| 国产欧美日韩麻豆91| 色老汉一区二区三区| 免费成人在线影院| 亚洲欧洲性图库| 制服丝袜一区二区三区| 国产a级毛片一区| 久久综合丝袜日本网| 91美女片黄在线| 久久er精品视频| 亚洲日本护士毛茸茸| 日韩欧美国产高清| 91美女蜜桃在线| 国产一区啦啦啦在线观看| 一区二区三区日韩精品| 精品国产乱码久久久久久久久| 久久99最新地址| 亚洲激情av在线| 久久久综合精品| 成人激情小说网站| 久久精品国产澳门| 亚洲美腿欧美偷拍| 亚洲精品一区二区三区99| 在线观看成人小视频| 国产精品一区二区你懂的| 午夜久久久久久久久久一区二区| 国产亚洲精久久久久久| 91精品福利在线一区二区三区 | 欧美精品一区二区在线播放| 日本韩国欧美一区| 成人免费视频caoporn| 免费高清视频精品| 日日欢夜夜爽一区| 亚洲一区在线看| 欧美理论电影在线| 91在线小视频| 成人激情av网| 国产精品一区二区久久精品爱涩| 午夜电影网一区| 亚洲国产毛片aaaaa无费看| 欧美一级久久久| 欧美色综合网站| 91丨porny丨户外露出| voyeur盗摄精品| 国产精品99久久不卡二区| 久久国产精品一区二区| 免费视频一区二区| 日韩av中文字幕一区二区三区| 亚洲一区二区不卡免费| 一区二区三区四区不卡视频 | 一区二区三区日韩欧美| 亚洲日本va午夜在线电影| 中文字幕在线观看不卡| 国产精品色婷婷| 国产精品久久精品日日| 欧美激情一区二区在线| 国产精品久久久久久久久免费樱桃| 国产精品拍天天在线| 国产精品国产三级国产三级人妇| 国产精品网站在线| 国产精品区一区二区三| 亚洲女同ⅹxx女同tv| 亚洲综合偷拍欧美一区色| 亚洲一区二区3| 日精品一区二区| 激情文学综合插| 国产成人福利片| av激情成人网| 欧美在线不卡视频| 91精品国产综合久久久久久 | 亚洲欧美另类综合偷拍| 夜夜精品视频一区二区| 日日夜夜免费精品| 国产一区二区女| 91香蕉视频mp4| 欧美日韩在线亚洲一区蜜芽| 91精品在线免费观看| 久久午夜免费电影| 亚洲人成在线播放网站岛国| 亚洲成人你懂的| 激情都市一区二区| 不卡的av电影在线观看| 欧美精品xxxxbbbb| 久久丝袜美腿综合| 亚洲男同性恋视频| 免费观看在线色综合| 成人中文字幕电影| 欧美日韩午夜在线视频| 久久伊99综合婷婷久久伊| 中文字幕永久在线不卡| 青青草原综合久久大伊人精品 | 紧缚奴在线一区二区三区| gogogo免费视频观看亚洲一| 欧美午夜不卡视频| 久久精品亚洲精品国产欧美kt∨ | 欧美日本精品一区二区三区| 精品少妇一区二区三区视频免付费| 久久久精品中文字幕麻豆发布| 亚洲美女淫视频| 国产在线播放一区三区四| 色婷婷综合五月| 久久这里只精品最新地址| 亚洲精品福利视频网站| 国产一区二区免费视频| 欧美日韩一区三区| 中文字幕亚洲在| 精久久久久久久久久久| 欧美日韩专区在线| 亚洲欧美国产三级| 国产91在线观看丝袜| 日韩区在线观看| 亚洲一级二级在线| 99热99精品| 国产欧美日韩激情| 麻豆精品国产91久久久久久| 在线亚洲+欧美+日本专区| 中文字幕精品三区| 精品在线播放免费| 欧美一区二区视频在线观看 | www.激情成人| 久久久国产综合精品女国产盗摄| 午夜成人在线视频| 在线观看一区不卡| 亚洲视频一区在线| 不卡的看片网站| 国产精品丝袜91| 丁香啪啪综合成人亚洲小说| 久久综合网色—综合色88| 裸体歌舞表演一区二区| 91精品国产免费| 美国毛片一区二区三区| 国产人伦精品一区二区| 九九精品视频在线看|