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

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

?? mouse45b.asm

?? USB大全電子版全部資料3~包含源碼、協議等
?? ASM
?? 第 1 頁 / 共 5 頁
字號:
      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



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

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美综合在线观看第十页| 国产精品伦一区二区三级视频| 国产精品资源在线| 亚洲乱码国产乱码精品精的特点 | 丝袜诱惑制服诱惑色一区在线观看 | 日韩制服丝袜av| 中文无字幕一区二区三区| 欧美蜜桃一区二区三区| aaa欧美日韩| 国产一区三区三区| 日韩二区三区在线观看| 亚洲蜜臀av乱码久久精品| 久久久久久久久99精品| 91精品视频网| 在线观看视频一区二区| 国产精品主播直播| 久国产精品韩国三级视频| 亚洲成av人片在线观看无码| 亚洲少妇最新在线视频| 欧美高清在线一区| 久久久国产精华| 欧美一二三四区在线| 欧美性猛交一区二区三区精品| zzijzzij亚洲日本少妇熟睡| 国产在线精品一区二区不卡了| 日韩精品免费专区| 亚洲电影第三页| 亚洲一区二区三区小说| 亚洲欧美成人一区二区三区| 亚洲国产高清在线| 中文字幕欧美国产| 国产欧美精品国产国产专区| 久久久青草青青国产亚洲免观| 91精品国产综合久久香蕉的特点| 欧美日韩一区二区不卡| 91高清视频免费看| 在线观看视频91| 欧美午夜影院一区| 欧美三级电影在线看| 欧美日韩午夜影院| 欧美日韩成人综合| 欧美电影影音先锋| 91精品国产aⅴ一区二区| 91精品欧美综合在线观看最新| 欧美影院午夜播放| 欧美少妇性性性| 91.com在线观看| 在线不卡a资源高清| 欧美一区二区三区成人| 日韩欧美激情在线| 久久综合久久综合久久综合| 久久久久久97三级| 中文字幕欧美国产| 亚洲免费伊人电影| 亚洲第四色夜色| 免费xxxx性欧美18vr| 狠狠色丁香久久婷婷综合_中 | 大白屁股一区二区视频| 国产v日产∨综合v精品视频| 成人性视频免费网站| 91美女片黄在线| 欧美性大战久久久| 日韩欧美一区二区久久婷婷| 久久先锋影音av鲁色资源网| 国产日韩成人精品| 一区二区在线观看视频| 天堂久久一区二区三区| 国模一区二区三区白浆| 成人免费观看男女羞羞视频| 在线看不卡av| 精品国产伦一区二区三区观看体验| 久久久精品中文字幕麻豆发布| 国产精品二三区| 香港成人在线视频| 韩国毛片一区二区三区| 99久久99久久免费精品蜜臀| 欧美日韩黄色影视| 国产视频在线观看一区二区三区| 综合激情成人伊人| 日韩av一级电影| 成人一区二区视频| 欧美少妇xxx| 国产女同性恋一区二区| 一个色综合网站| 国产在线国偷精品免费看| 91免费国产视频网站| 日韩欧美国产系列| 亚洲手机成人高清视频| 免费成人美女在线观看.| 99精品国产热久久91蜜凸| 日韩视频一区二区三区| 一区视频在线播放| 九九国产精品视频| 欧美影院一区二区三区| 26uuu亚洲| 日韩专区在线视频| 99国产精品一区| 精品卡一卡二卡三卡四在线| 亚洲自拍偷拍欧美| 成人网在线播放| 欧美zozo另类异族| 亚洲成人动漫在线免费观看| 成人午夜电影久久影院| 日韩欧美国产小视频| 亚洲国产成人高清精品| eeuss国产一区二区三区| 日韩欧美中文字幕制服| 亚洲国产成人精品视频| av一区二区三区黑人| 欧美精品一区二区精品网| 天天av天天翘天天综合网| 99re成人在线| 国产精品嫩草99a| 九九国产精品视频| 日韩欧美在线观看一区二区三区| 亚洲欧美另类在线| 波多野结衣中文字幕一区二区三区| 欧美成人伊人久久综合网| 丝袜亚洲另类丝袜在线| 欧美亚洲国产一卡| 亚洲欧美视频一区| 不卡一二三区首页| 亚洲国产激情av| 国产成人av电影在线观看| 日韩精品一区二区三区老鸭窝| 亚洲成人tv网| 欧美亚洲禁片免费| 亚洲亚洲精品在线观看| 色综合久久九月婷婷色综合| 国产精品视频观看| 成人综合在线观看| 中文字幕欧美国产| 成人丝袜18视频在线观看| 国产人成一区二区三区影院| 国产裸体歌舞团一区二区| 久久综合色播五月| 国产美女主播视频一区| 久久天堂av综合合色蜜桃网| 久久99精品久久久久久动态图| 欧美一级片免费看| 美女尤物国产一区| 欧美成人激情免费网| 久久丁香综合五月国产三级网站 | 欧美mv日韩mv国产网站app| 青青草精品视频| 欧美电影免费观看高清完整版在| 日本aⅴ精品一区二区三区| 日韩精品一区二区三区swag| 精品一二三四区| 国产亚洲一区字幕| 成人国产精品免费网站| 亚洲免费观看在线视频| 91亚洲永久精品| 亚洲国产一区二区a毛片| 在线电影院国产精品| 毛片一区二区三区| 久久久三级国产网站| bt欧美亚洲午夜电影天堂| 亚洲精品免费在线观看| 精品视频一区二区不卡| 麻豆精品一区二区| 国产午夜精品一区二区 | 精品嫩草影院久久| 顶级嫩模精品视频在线看| 最新国产成人在线观看| 欧美日韩极品在线观看一区| 麻豆国产91在线播放| 中文字幕免费不卡在线| 欧美性猛交xxxxxxxx| 久久爱www久久做| 日韩美女久久久| 69久久99精品久久久久婷婷| 国产在线播放一区三区四| 国产精品久久久爽爽爽麻豆色哟哟| 在线看一区二区| 国产呦萝稀缺另类资源| 亚洲欧洲国产日本综合| 91麻豆精品国产综合久久久久久| 国产一区二区精品在线观看| 亚洲精品久久嫩草网站秘色| 日韩欧美一区二区三区在线| 99久久er热在这里只有精品15| 视频在线在亚洲| 国产精品免费人成网站| 欧美精品在线视频| 国产成人综合视频| 天天色天天爱天天射综合| 国产三级精品三级| 欧美精品一二三区| 成人久久视频在线观看| 日本视频一区二区三区| 中文字幕制服丝袜一区二区三区 | 国产成人亚洲综合a∨猫咪| 亚洲黄色性网站| 国产无遮挡一区二区三区毛片日本| 在线一区二区三区做爰视频网站| 国精品**一区二区三区在线蜜桃| 亚洲午夜一区二区三区| 欧美国产乱子伦| 欧美一区二区三区公司|