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

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

?? usb_cls_hid.asm

?? 基于Cypress CY3655開發工具的USB鼠標程序
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
;
;****************************************************************
; HID CLASS INTERFACE OUT REQUEST: Set_Idle
;****************************************************************
;
; bmRequestType   : (OUT | CLASS | INTERFACE)      = 21h
; bRequest        : SET_IDLE                       = 0Ah    
; wValue          : DURATION | REPORT ID           = xxxxh  
; wIndex          : INTERFACE                      = --xxh
; wLength         : ZERO                           = 0000h  
; 
; The SET_IDLE request silences a particular input report (or all 
; input reports) on a specific interface until a new event occurs 
; or the specified amount of time passes. 
;
;****************************************************************
; Note: This function does not support multiple reports per interface.
;****************************************************************
;-----------------------------------------------------------------------------
;
;  ARGUMENTS:
;
;  RETURNS:
;
;  SIDE EFFECTS: REGISTERS ARE VOLATILE: THE A AND X REGISTERS MAY BE MODIFIED!
;
;  THEORY of OPERATION or PROCEDURE:
;
;-----------------------------------------------------------------------------
IF (USB_CB_SRC_h2d_cls_ifc_10 & USB_UM_SUPPLIED)
export  USB_CB_h2d_cls_ifc_10
USB_CB_h2d_cls_ifc_10:
    MOV     A, REG[USB_EP0DATA+wValueLo]  ; Get the report number
    CMP     A, 0                       ; We don't support report by report idle
    JNZ     USB_Not_Supported_Local_Hid

    MOV     A, REG[USB_EP0DATA+wIndexLo]  ; Get the interface number
    CMP     A, 1h                      ; Range Check
    JNC     USB_Not_Supported_Local_Hid

    MOV     X, A                       ; Interface Number becomes an index

    MOV     A, REG[USB_EP0DATA+wValueHi]  ; Get the duration

    MOV     [X+USB_IdleReload], A      ; Save the reload immediately
    CMP     A, 0                       ; Is this request setting the duration to indefinite?
    JZ      .reload                    ; If so, reload the timer 

    ; Otherwise, we need to determine if we reset the current expiry
    ; (HID Spec says to send the next report if we are within 4 ms (1 count)
    ; of sending the next report
    CMP     [X+USB_IdleTimer], 1       ; Within 4 ms?
    JZ      .done                      ; Jump to let the timer expire "naturally" 

; Jump or Flow here to reload the timer
.reload:
    MOV     [x+USB_IdleTimer], A       ; Reload the timer
            
.done:
    JMP     USB_NoDataStageControlTransfer
ENDIF
;-----------------------------------------------------------------------------
;  FUNCTION NAME: USB_CB_h2d_cls_ifc_11
;
;  DESCRIPTION:   Set Idle
;
;****************************************************************
; HID CLASS INTERFACE OUT REQUEST: Set_Protocol
;****************************************************************
;
; bmRequestType  : (OUT | CLASS | INTERFACE)      = 21h
; bRequest       : SET_PROTOCOL                   = 0Bh    
; wValue         : DURATION | REPORT ID           = xxxxh  
; wIndex         : PROTOCOL                       = --xxh
; wLength        : ZERO                           = 0000h  
; 
; The SET_PROTOCOL request switches between the boot protocol and 
; the report protocol (or vice versa). 
;
;****************************************************************
;-----------------------------------------------------------------------------
;
;  ARGUMENTS:
;
;  RETURNS:
;
;  SIDE EFFECTS: REGISTERS ARE VOLATILE: THE A AND X REGISTERS MAY BE MODIFIED!
;
;  THEORY of OPERATION or PROCEDURE:
;
;-----------------------------------------------------------------------------
IF (USB_CB_SRC_h2d_cls_ifc_11 & USB_UM_SUPPLIED)
export  USB_CB_h2d_cls_ifc_11
USB_CB_h2d_cls_ifc_11:
    MOV     A, REG[USB_EP0DATA+wIndexLo]  ; Get the interface number
    CMP     A, 1h                      ; Range check
    JNC     USB_Not_Supported_Local_Hid

    MOV     X, A                       ; Save the interface number

    MOV     A, REG[USB_EP0DATA+wValueLo]  ; Get the protocol
    CMP     A, (1+1)                   ; Must be zero or one
    JNC     USB_Not_Supported_Local_Hid

    MOV     [X + USB_Protocol], A      ; Save the new protocol

    LJMP     USB_NoDataStageControlTransfer
ENDIF
;-----------------------------------------------------------------------------
;  FUNCTION NAME:   Find_Report
;
;  DESCRIPTION:     Scan the HID Report Tree and return a pointer to the 
;                   HID Report Transfer Descriptor (TD) or NULL
;                   This function is called in during the processing of
;                   GET_REPORT or SET_REPORT HID Class Requests.
;
;-----------------------------------------------------------------------------
;
;  ARGUMENTS:       
;
;  RETURNS:
;
;  SIDE EFFECTS: REGISTERS ARE VOLATILE: THE A AND X REGISTERS MAY BE MODIFIED!
;
;  THEORY of OPERATION or PROCEDURE:
;
;-----------------------------------------------------------------------------
Find_Report:
    CALL    USB_GetInterfaceLookupTable  ; Point the the interface lookup table
    ; The first entry of the table point to the report table.
    MOV     [USB_t2],USB_t1            ; Set the GETWORD destination 
    CALL    USB_GETWORD                ; Get the pointer to the transfer descriptor table
                                       ; ITempW has the address
    MOV     A, REG[USB_EP0DATA+wIndexLo]  ; Get the interface number
    MOV     [USB_t2], A                ; Use the UM temp var--Selector
    MOV     A, [USB_t1]                ; Get the Table Address MSB
    MOV     X, [USB_t1+1]              ; Get the Table Address LSB

    ASL     [USB_t2]                   ; Convert the index to offset

    SWAP    A, X
    ADD     A, [USB_t2]
    SWAP    A, X
    ADC     A, 0                       ; A:X now points to the table entry we want

; Get the pointer to the Report Type Table
    GET_WORD

; Dereference to the requested Report Type
    PUSH    A                          ; Don't loose the pointer MSB
    MOV     A, REG[USB_EP0DATA+wValueHi]  ; Get the Report Type
    DEC     A                          ; Make it 0 based
    MOV     [USB_t2], A                ; Use the UM temp var--Selector
    POP     A                          ; Get the MSB back
    PUSH    A                          ; Don't loose the pointer MSB
    ROMX                               ; Get the table size
    CMP     A, [USB_t2]                ; Range check
    JC      .not_supported_pop_1
        
    POP     A                          ; Get the MSB back
    INC     X                          ; Point to the next  entry
    ADC     A, 0                       ;

    LT_INDEX_TO_OFFSET USB_t2          ; Convert the index to offset

    SWAP    A, X
    ADD     A, [USB_t2]
    SWAP    A, X
    ADC     A, 0                       ; A:X now points to the table entry we want
; Get the pointer to the requested Report Table
    GET_WORD                            ; A:X points to the 

    NULL_PTR_CHECK .not_supported      ; Null Table entries indicated not supported
; Dereference to the requested TRANSFER DESCRIPTOR
    PUSH    A                          ; Don't loose the pointer MSB
    MOV     A, REG[USB_EP0DATA+wValueLo]  ; Get the Report ID
    MOV     [USB_t2], A                ; Use the UM temp var--Selector
    POP     A                          ; Get the MSB back
    PUSH    A                          ; Don't loose the pointer MSB
    ROMX                               ; Get the table size
    CMP     A, [USB_t2]                ; Range check
    JC      .not_supported_pop_1
        
    POP     A                          ; Get the MSB back

    RET                                ; Finished A:X point to the TD

.not_supported_pop_1:
    POP     A                          ; Restore the stack
.not_supported:
    MOV     A, 0                       ; Return a null pointer
    MOV     X, A                       ; 
    RET

;-----------------------------------------------------------------------------
;  FUNCTION NAME: USB_GetInterfaceLookupTable
;
;  DESCRIPTION:   Point to the interface lookup table
;
;-----------------------------------------------------------------------------
;
;  ARGUMENTS:
;
;  RETURNS:
;
;  SIDE EFFECTS: REGISTERS ARE VOLATILE: THE A AND X REGISTERS MAY BE MODIFIED!
;
;  THEORY of OPERATION or PROCEDURE:
;
;-----------------------------------------------------------------------------
export  USB_GetInterfaceLookupTable:
USB_GetInterfaceLookupTable:
    CALL    USB_GET_CONFIG_TABLE_ENTRY ; Get the CONFIG_LOOKUP entry
    SWAP    A, X                       ; Second entry points to the HID_LOOKUP table
    ADD     A, 2                       ; So add two
    SWAP    A, X                       ; 
    ADC     A, 0                       ; Don't forget the carry
    MOV     [USB_t2],USB_t1            ; Set the GETWORD destination 
    CALL    USB_GETWORD                ; Get the pointer to the HID_LOOKUP table
                                       ; ITempW has the address
    MOV     A, [USB_t1]                ; Get the table address MSB
    MOV     X, [USB_t1+1]              ; Get the table address LSB
    RET
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
;  USB 2nd Tier Dispactch Jump Tables for HID Class Requests (based on bRequest)
;-----------------------------------------------------------------------------
;  FUNCTION NAME: ;  USB 2nd Tier Dispactch Jump Table
;
;  DESCRIPTION:   The following tables dispatch to the Standard request handler
;                 functions.  (Assumes bmRequestType(5:6) is 0, Standard)
;
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
USB_DT_h2d_cls_ifc:
;-----------------------------------------------------------------------------
    jmp     USB_CB_h2d_cls_ifc_00
    jmp     USB_CB_h2d_cls_ifc_01
    jmp     USB_CB_h2d_cls_ifc_02
    jmp     USB_CB_h2d_cls_ifc_03
    jmp     USB_CB_h2d_cls_ifc_04
    jmp     USB_CB_h2d_cls_ifc_05
    jmp     USB_CB_h2d_cls_ifc_06
    jmp     USB_CB_h2d_cls_ifc_07
    jmp     USB_CB_h2d_cls_ifc_08
    jmp     USB_CB_h2d_cls_ifc_09
    jmp     USB_CB_h2d_cls_ifc_10
    jmp     USB_CB_h2d_cls_ifc_11
    jmp     USB_CB_h2d_cls_ifc_12

USB_DT_h2d_cls_ifc_End:
USB_DT_h2d_cls_ifc_Size: equ (USB_DT_h2d_cls_ifc_End-USB_DT_h2d_cls_ifc) / 2
USB_DT_h2d_cls_ifc_Dispatch::
    CMP     [USB_Configuration], 0     ; Is the device configured?
    JNZ     .configured                ; Jump on configured
    JMP     USB_Not_Supported_Local_Hid  ; Stall the request if not configured
; Jump here if the device is configured
.configured:
    MOV     A, REG[USB_EP0DATA + bRequest]       ; Get the request number
    DISPATCHER USB_DT_h2d_cls_ifc, USB_DT_h2d_cls_ifc_Size, USB_Not_Supported_Local_Hid 

;-----------------------------------------------------------------------------
USB_DT_d2h_cls_ifc:
;-----------------------------------------------------------------------------

    jmp     USB_CB_d2h_cls_ifc_00
    jmp     USB_CB_d2h_cls_ifc_01
    jmp     USB_CB_d2h_cls_ifc_02
    jmp     USB_CB_d2h_cls_ifc_03

USB_DT_d2h_cls_ifc_End:
USB_DT_d2h_cls_ifc_Size: equ (USB_DT_d2h_cls_ifc_End-USB_DT_d2h_cls_ifc) / 2
USB_DT_d2h_cls_ifc_Dispatch::
    CMP     [USB_Configuration], 0     ; Is the device configured?
    JNZ     .configured                ; Jump on configured
    JMP     USB_Not_Supported_Local_Hid  ; Stall the request if not configured
; Jump here if the device is configured
.configured:
    MOV     A, REG[USB_EP0DATA + bRequest]       ; Get the request number
    DISPATCHER USB_DT_d2h_cls_ifc, USB_DT_d2h_cls_ifc_Size, USB_Not_Supported_Local_Hid 

IF (USB_CB_SRC_d2h_cls_ifc_00 & USB_NOT_SUPPORTED)
export  USB_CB_d2h_cls_ifc_00
USB_CB_d2h_cls_ifc_00:
ENDIF
IF (USB_CB_SRC_d2h_cls_ifc_01 & USB_NOT_SUPPORTED)
export  USB_CB_d2h_cls_ifc_01
USB_CB_d2h_cls_ifc_01:
ENDIF
IF (USB_CB_SRC_d2h_cls_ifc_02 & USB_NOT_SUPPORTED)
export  USB_CB_d2h_cls_ifc_02
USB_CB_d2h_cls_ifc_02:
ENDIF
IF (USB_CB_SRC_d2h_cls_ifc_03 & USB_NOT_SUPPORTED)
export  USB_CB_d2h_cls_ifc_03
USB_CB_d2h_cls_ifc_03:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_00 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_00
USB_CB_h2d_cls_ifc_00:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_01 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_01
USB_CB_h2d_cls_ifc_01:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_02 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_02
USB_CB_h2d_cls_ifc_02:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_03 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_03
USB_CB_h2d_cls_ifc_03:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_04 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_04
USB_CB_h2d_cls_ifc_04:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_05 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_05
USB_CB_h2d_cls_ifc_05:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_06 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_06
USB_CB_h2d_cls_ifc_06:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_07 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_07
USB_CB_h2d_cls_ifc_07:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_08 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_08
USB_CB_h2d_cls_ifc_08:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_09 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_09
USB_CB_h2d_cls_ifc_09:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_10 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_10
USB_CB_h2d_cls_ifc_10:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_11 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_11
USB_CB_h2d_cls_ifc_11:
ENDIF
IF (USB_CB_SRC_h2d_cls_ifc_12 & USB_NOT_SUPPORTED)
export  USB_CB_h2d_cls_ifc_12
USB_CB_h2d_cls_ifc_12:
ENDIF

USB_Not_Supported_Local_Hid:
    LJMP     USB_Not_Supported

USB_GetTableEntry_Local_Hid:
    LJMP     USB_GetTableEntry

;-----------------------------------------------
; Add custom application code for routines 
; redefined by USB_APP_SUPPLIED in USB_HID.INC
;-----------------------------------------------

   ;@PSoC_UserCode_BODY_1@ (Do not change this line.)
   ;---------------------------------------------------
   ; Insert your custom code below this banner
   ;---------------------------------------------------

   ;---------------------------------------------------
   ; Insert your custom code above this banner
   ;---------------------------------------------------
   ;@PSoC_UserCode_END@ (Do not change this line.)

; End of File USB_cls_hid.asm

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品菠萝久久久久久久| 成人国产免费视频| 国产精品成人一区二区三区夜夜夜| 成人做爰69片免费看网站| 国产一区二区女| 视频一区中文字幕国产| 国产欧美日韩在线观看| 日韩精品一区二区三区视频播放| 老司机精品视频线观看86| 中文字幕日本不卡| 国产精品久久久久9999吃药| 中文字幕一区二区三区四区 | 久久天堂av综合合色蜜桃网| 91麻豆精品国产| 欧美日韩精品一区二区| 在线精品观看国产| 欧美中文字幕亚洲一区二区va在线| 色婷婷激情综合| 欧美性受xxxx| 国产午夜精品一区二区| 亚洲三级免费观看| 日本不卡的三区四区五区| 国产成人啪免费观看软件| 91在线你懂得| 91精品黄色片免费大全| 日本一区二区三区电影| 自拍视频在线观看一区二区| 蜜桃av一区二区三区电影| 国产成人免费视频网站| 欧美性xxxxx极品少妇| 国产亚洲欧美激情| 一区二区视频免费在线观看| 天天综合网天天综合色| 91在线porny国产在线看| 欧美一区二区久久| 国产三区在线成人av| 亚洲电影欧美电影有声小说| 国产在线精品不卡| 色综合久久综合| 久久精品人人爽人人爽| 五月天一区二区| 欧美日韩成人综合在线一区二区 | 国产精品久久久久影院| 美国十次综合导航| 3atv在线一区二区三区| 欧美二区乱c少妇| 色综合久久天天| 亚洲女子a中天字幕| 99国产精品国产精品毛片| 国产色产综合产在线视频| 国产精品一区专区| 国产亚洲精品中文字幕| 国产成人啪午夜精品网站男同| 久久免费美女视频| 成人一级片网址| 亚洲裸体xxx| 日韩午夜激情av| 粉嫩高潮美女一区二区三区| 中文字幕成人网| 欧亚洲嫩模精品一区三区| 日本午夜一区二区| 国产欧美综合在线| 欧美丝袜自拍制服另类| 捆绑调教美女网站视频一区| 久久久久久97三级| 99久久伊人久久99| 免费观看久久久4p| 亚洲人成小说网站色在线 | 久久精品视频在线看| 成人app下载| 日韩高清不卡在线| 国产亚洲精品7777| 制服丝袜在线91| www.色精品| 成人性生交大片免费| 日韩综合小视频| 一区二区三区成人在线视频| 久久久久久久久久美女| 欧美午夜精品理论片a级按摩| 日韩电影网1区2区| 国产欧美日韩三区| √…a在线天堂一区| 亚洲精品成人悠悠色影视| 日韩中文字幕91| 不卡的电影网站| 成人黄色av网站在线| 色婷婷综合久久久久中文一区二区| 欧美午夜一区二区三区| 国产亚洲va综合人人澡精品 | 欧美艳星brazzers| 久久免费的精品国产v∧| 亚洲一二三级电影| 高潮精品一区videoshd| 免费观看在线综合色| 久久久久久久综合狠狠综合| 777色狠狠一区二区三区| 日韩欧美自拍偷拍| 久久久久久一二三区| 亚洲欧美日韩久久| 亚洲国产日韩精品| 久久电影网电视剧免费观看| 国产剧情在线观看一区二区| 国产.欧美.日韩| 欧美性三三影院| 国产日产欧美一区二区视频| 国产精品白丝在线| 午夜久久久久久久久久一区二区| 老司机精品视频在线| av电影在线观看一区| 欧美大片拔萝卜| 亚洲裸体在线观看| 高清日韩电视剧大全免费| k8久久久一区二区三区| 精品国产乱码久久久久久图片| 中文文精品字幕一区二区| 亚洲成a人v欧美综合天堂下载| 国产精品中文字幕欧美| 精品视频一区二区三区免费| 国产日韩精品视频一区| 日韩福利视频导航| 91成人在线免费观看| 亚洲女子a中天字幕| 热久久国产精品| 欧美性受极品xxxx喷水| 亚洲视频一区二区在线| 国产精品中文字幕欧美| 欧美精品一区二区蜜臀亚洲| 免费成人美女在线观看.| 91精品蜜臀在线一区尤物| 亚洲精品写真福利| 欧美三级在线看| 国产成人精品亚洲日本在线桃色| 一本色道久久综合精品竹菊| 欧美r级在线观看| 国产精品无码永久免费888| 国产亚洲精久久久久久| 日韩一区中文字幕| 亚洲男人的天堂一区二区| 日韩精品1区2区3区| 国产精品影视在线| 欧美一级一区二区| 免费人成黄页网站在线一区二区| 欧美三级日韩在线| 日本va欧美va欧美va精品| 欧美精品自拍偷拍动漫精品| 精品在线免费观看| 日本一区二区三区四区 | 91福利区一区二区三区| 舔着乳尖日韩一区| 国产女人aaa级久久久级| 色婷婷av一区二区三区大白胸| 一二三区精品视频| 日韩免费观看2025年上映的电影| 国产综合成人久久大片91| 国产精品久久久久9999吃药| 欧美三级视频在线观看| 国产成人综合亚洲网站| 亚洲成av人片在线| 亚洲欧洲av一区二区三区久久| 在线电影一区二区三区| 99久久免费精品| 国产自产视频一区二区三区| 亚洲精品美腿丝袜| 日本一区二区三区免费乱视频| 欧美精品日韩综合在线| 99热这里都是精品| 国产乱理伦片在线观看夜一区| 亚洲资源中文字幕| 日韩一区二区在线观看| 91成人免费在线| 色综合一个色综合亚洲| 色综合天天综合网天天狠天天| 国产原创一区二区三区| 蜜桃精品视频在线| 首页亚洲欧美制服丝腿| 综合色天天鬼久久鬼色| 国产日本一区二区| 国产亚洲1区2区3区| 国产精品色噜噜| 日韩精品一区二区在线| 51精品国自产在线| 91 com成人网| 欧美变态tickling挠脚心| 精品成人佐山爱一区二区| 欧美一区日本一区韩国一区| 精品国产亚洲在线| 国产视频一区在线播放| 国产日韩精品一区二区三区在线| 亚洲国产精品传媒在线观看| 国产精品高潮呻吟久久| 亚洲第一主播视频| 精品一区精品二区高清| 成人视屏免费看| 欧美性生活一区| 久久综合国产精品| 中文字幕一区二区三区蜜月| 日韩精品电影一区亚洲| 成人综合在线观看| 在线播放欧美女士性生活| 国产精品免费aⅴ片在线观看|