⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cy4623_rdk.lst

📁 Cypress cy7c63318 鼠标开发板的源代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
                                   (0154) export  USB_CB_d2h_std_ifc_03
                                   (0155) USB_CB_d2h_std_ifc_03:
                                   (0156) ENDIF
                                   (0157) IF (USB_CB_SRC_d2h_std_ifc_04 & USB_NOT_SUPPORTED)
                                   (0158) export  USB_CB_d2h_std_ifc_04
                                   (0159) USB_CB_d2h_std_ifc_04:
                                   (0160) ENDIF
                                   (0161) IF (USB_CB_SRC_d2h_std_ifc_05 & USB_NOT_SUPPORTED)
                                   (0162) export  USB_CB_d2h_std_ifc_05
                                   (0163) USB_CB_d2h_std_ifc_05:
                                   (0164) ENDIF
                                   (0165) IF (USB_CB_SRC_d2h_std_ifc_06 & USB_NOT_SUPPORTED)
                                   (0166) export  USB_CB_d2h_std_ifc_06
                                   (0167) USB_CB_d2h_std_ifc_06:
                                   (0168) ENDIF
                                   (0169) IF (USB_CB_SRC_d2h_std_ifc_07 & USB_NOT_SUPPORTED)
                                   (0170) export  USB_CB_d2h_std_ifc_07
                                   (0171) USB_CB_d2h_std_ifc_07:
                                   (0172) ENDIF
                                   (0173) IF (USB_CB_SRC_d2h_std_ifc_08 & USB_NOT_SUPPORTED)
                                   (0174) export  USB_CB_d2h_std_ifc_08
                                   (0175) USB_CB_d2h_std_ifc_08:
                                   (0176) ENDIF
                                   (0177) IF (USB_CB_SRC_d2h_std_ifc_09 & USB_NOT_SUPPORTED)
                                   (0178) export  USB_CB_d2h_std_ifc_09
                                   (0179) USB_CB_d2h_std_ifc_09:
                                   (0180) ENDIF
                                   (0181) IF (USB_CB_SRC_d2h_std_ifc_10 & USB_NOT_SUPPORTED)
                                   (0182) export  USB_CB_d2h_std_ifc_10
                                   (0183) USB_CB_d2h_std_ifc_10:
                                   (0184) ENDIF
                                   (0185) 
                                   (0186) ; d2h_std_ifc
                                   (0187) IF (USB_CB_SRC_h2d_std_ifc_00 & USB_NOT_SUPPORTED)
                                   (0188) export  USB_CB_h2d_std_ifc_00
                                   (0189) USB_CB_h2d_std_ifc_00:
                                   (0190) ENDIF
                                   (0191) 
                                   (0192) ; d2h_std_ep
                                   (0193) IF (USB_CB_SRC_d2h_std_ep_00 & USB_NOT_SUPPORTED)
                                   (0194) export  USB_CB_d2h_std_ep_00
                                   (0195) USB_CB_d2h_std_ep_00:
                                   (0196) ENDIF
                                   (0197) 
                                   (0198) ; h2d_std_ep
                                   (0199) IF (USB_CB_SRC_h2d_std_ep_00 & USB_NOT_SUPPORTED)
                                   (0200) export  USB_CB_h2d_std_ep_00
                                   (0201) USB_CB_h2d_std_ep_00:
                                   (0202) ENDIF
                                   (0203) IF (USB_CB_SRC_h2d_std_ep_01 & USB_NOT_SUPPORTED)
                                   (0204) export  USB_CB_h2d_std_ep_01
                                   (0205) USB_CB_h2d_std_ep_01:
                                   (0206) ENDIF
                                   (0207) IF (USB_CB_SRC_h2d_std_ep_02 & USB_NOT_SUPPORTED)
                                   (0208) export  USB_CB_h2d_std_ep_02
                                   (0209) USB_CB_h2d_std_ep_02:
                                   (0210) ENDIF
                                   (0211) IF (USB_CB_SRC_h2d_std_ep_03 & USB_NOT_SUPPORTED)
                                   (0212) export  USB_CB_h2d_std_ep_03
                                   (0213) USB_CB_h2d_std_ep_03:
                                   (0214) ENDIF
                                   (0215) 
                                   (0216) export  USB_Not_Supported
                                   (0217) export _USB_Not_Supported
                                   (0218) USB_Not_Supported:
                                   (0219) _USB_Not_Supported:
01FC: 50 00    MOV   A,0           (0220)    MOV    A, 0                         ; Count 0
01FE: 57 03    MOV   X,3           (0221)    MOV    X, USB_MODE_STALL_IN_OUT     ; Stall the request
0200: 7D 04 96 LJMP  0x0496        (0222)    LJMP   USB_EP0_UPD_MODE_EXIT
0203: 00       SWI   
0204: 01 00    ADD   A,0
0206: 02 00    ADD   A,[is_ps2]
0208: 28       ROMX  
0209: 00       SWI   
020A: 00       SWI   
020B: DE 55    JNC   0x0061
                                   (0223) ;-----------------------------------------------------------------------------
                                   (0224) ;  FUNCTION NAME: USB_CB_d2h_std_dev_00
                                   (0225) ;
                                   (0226) ;  DESCRIPTION:   Get Device Status
                                   (0227) ;
                                   (0228) ;****************************************************************
                                   (0229) ; STANDARD DEVICE IN REQUEST: Get_Device_Status
                                   (0230) ;****************************************************************
                                   (0231) ;
                                   (0232) ; bmRequestType  : (IN | STANDARD | DEVICE)       = 80h     
                                   (0233) ; bRequest       : GET_STATUS                     = 00h    
                                   (0234) ; wValue         : RESERVED                       = 0000h  
                                   (0235) ; wIndex         : RESERVED                       = 0000h
                                   (0236) ; wLength        : SIZEOF_ENDPOINT_STATUS         = 0002h  
                                   (0237) ; 
                                   (0238) ; The GET_DEVICE_STATUS request returns the current device status.
                                   (0239) ;
                                   (0240) ;****************************************************************
                                   (0241) ;-----------------------------------------------------------------------------
                                   (0242) ;
                                   (0243) ;  ARGUMENTS:
                                   (0244) ;
                                   (0245) ;  RETURNS:
                                   (0246) ;
                                   (0247) ;  SIDE EFFECTS: REGISTERS ARE VOLATILE: THE A AND X REGISTERS MAY BE MODIFIED!
                                   (0248) ;
                                   (0249) ;  THEORY of OPERATION or PROCEDURE:
                                   (0250) ;
                                   (0251) ;-----------------------------------------------------------------------------
                                   (0252) IF (USB_CB_SRC_d2h_std_dev_00 & USB_UM_SUPPLIED)
                                   (0253) .LITERAL
                                   (0254) GetStatusTransferDescrTable:
                                   (0255)     TD_START_TABLE 1                   ; One entry
                                   (0256)     TD_ENTRY    USB_DS_RAM, 2, USB_TransferBuffer, NULL_PTR  ; Intermediate Buffer
                                   (0257) .ENDLITERAL
                                   (0258) export  USB_CB_d2h_std_dev_00
                                   (0259) USB_CB_d2h_std_dev_00:
020D: 3B 00    CMP   A,[X+0]       (0260)     MOV     [USB_t2], 0                ; Use the UM temp var--Selector
                                   (0261) 
020F: 55 29 00 MOV   [USB_TransferBuffer+1],0(0262)     MOV     [USB_TransferBuffer+1], 0  ; Use the UM Transfer Buffer
0212: 5F 28 21 MOV   [USB_TransferType+1],[USB_DeviceStatus](0263)     MOV     [USB_TransferBuffer], [USB_DeviceStatus]
                                   (0264) 
0215: 50 02    MOV   A,2           (0265)     MOV     A,>GetStatusTransferDescrTable  ; Get the ROM Address MSB
0217: 57 03    MOV   X,3           (0266)     MOV     X,<GetStatusTransferDescrTable  ; Get the ROM Address LSB
0219: 82 67    JMP   0x0481        (0267)     JMP     USB_GetTableEntry_Local_Std
                                   (0268) ENDIF
                                   (0269) ;-----------------------------------------------------------------------------
                                   (0270) ; FUNCTION NAME: USB_CB_d2h_std_dev_06
                                   (0271) ;
                                   (0272) ; DESCRIPTION:   Get Device Descriptor
                                   (0273) ;
                                   (0274) ;****************************************************************
                                   (0275) ; STANDARD DEVICE IN REQUEST: Get_Device_Descriptor
                                   (0276) ;****************************************************************
                                   (0277) ;
                                   (0278) ; bmRequestType  : (IN | STANDARD | DEVICE)       = 80h
                                   (0279) ; bRequest       : GET_DESCRIPTOR                 = 06h    
                                   (0280) ; wValue         : DESCRIPTOR TYPE | INDEX        = xxxxh  
                                   (0281) ; wIndex         : ZERO or LANG_ID                = xxxxh
                                   (0282) ; wLength        : SIZEOF_DESCRIPTOR              = --xxh  
                                   (0283) ; 
                                   (0284) ; The GET_DEVICE_DESCRIPTOR returns the specified descriptor if 
                                   (0285) ; the descriptor exists. 
                                   (0286) ; 
                                   (0287) ; The upper byte of wValue contains the descriptor type and 
                                   (0288) ; the lower byte contains the descriptor index. wIndex 
                                   (0289) ; contains either 0000h or the Language ID. wLength contains 
                                   (0290) ; the descriptor length. The actual descriptor information is 
                                   (0291) ; transferred in subsequent data packets. 
                                   (0292) ;
                                   (0293) ;****************************************************************
                                   (0294) ;
                                   (0295) ;-----------------------------------------------------------------------------
                                   (0296) ;
                                   (0297) ;  ARGUMENTS:
                                   (0298) ;
                                   (0299) ;  RETURNS:
                                   (0300) ;
                                   (0301) ;  SIDE EFFECTS: REGISTERS ARE VOLATILE: THE A AND X REGISTERS MAY BE MODIFIED!
                                   (0302) ;
                                   (0303) ;  THEORY of OPERATION or PROCEDURE:
                                   (0304) ;
                                   (0305) ;-----------------------------------------------------------------------------
                                   (0306) IF (USB_CB_SRC_d2h_std_dev_06 & USB_UM_SUPPLIED)
                                   (0307) export  USB_CB_d2h_std_dev_06
                                   (0308) USB_CB_d2h_std_dev_06:
                                   (0309) ;-----------------------------------------------------------------------------
                                   (0310) ; Dispatch to the proper handler
                                   (0311) ;-----------------------------------------------------------------------------
021B: 5D 53    MOV   A,REG[83]     (0312)     MOV     A, REG[USB_EP0DATA+wValueHi] ; Get the descrptor type
021D: 64       ASL   A             (0313)     ASL     A                          ; Make it into a offset
021E: 39 08    CMP   A,8           (0314)     CMP     A, GET_DESCR_DISPATCH_SIZE         ; Validity check
0220: DF DB    JNC   0x01FC        (0315)     JNC     USB_Not_Supported
                                   (0316) 
0222: E0 01    JACC  0x0224        (0317)     JACC    GET_DESCR_DISPATCH
                                   (0318) 
                                   (0319) GET_DESCR_DISPATCH:
0224: 8F D7    JMP   0x01FC        (0320)     JMP     USB_Not_Supported          ; Invalid
0226: 80 28    JMP   0x024F        (0321)     JMP     USB_SendDeviceDescr        ; Device Descriptor
0228: 80 03    JMP   0x022C        (0322)     JMP     USB_SendConfigDescr        ; Configuration Descriptor
                                   (0323) IF  USB_bNumStringDescrs               ; Number of String Descriptor defined with the Wizard
022A: 80 34    JMP   0x025F        (0324)     JMP     USB_SendStringDescr        ; String Descriptor
                                   (0325) ELSE
                                   (0326)     JMP     USB_Not_Supported          ; Not supported if we don't have
                                   (0327)                                             ; any String Descriptor
                                   (0328) ENDIF
                                   (0329) GET_DESCR_DISPATCH_END:
                                   (0330) GET_DESCR_DISPATCH_SIZE: EQU (GET_DESCR_DISPATCH_END - GET_DESCR_DISPATCH)     
                                   (0331) ;-----------------------------------------------------------------------------
                                   (0332) ; Configuration Descriptor Handler
                                   (0333) ;-----------------------------------------------------------------------------
                                   (0334) USB_SendConfigDescr:
022C: 94 27    CALL  0x0655        (0335)     CALL    USB_GET_DEVICE_TABLE_ENTRY
022E: 4B       SWAP  A,X           (0336)     SWAP    A, X
022F: 01 02    ADD   A,2           (0337)     ADD     A, 2                       ; We want the pointer to the descriptor table (second entry)
0231: 4B       SWAP  A,X           (0338)     SWAP    A, X
0232: 09 00    ADC   A,0           (0339)     ADC     A, 0                       ; Don't forget the carry
0234: 55 3B 3C MOV   [USB_t2],60   (0340)     MOV    [USB_t2], USB_t1            ; Set up the destination  
0237: 94 0B    CALL  0x0644        (0341)     CALL    USB_GETWORD                ; Get the pointer
                                   (0342)     
0239: 51 3C    MOV   A,[USB_t1]    (0343)     MOV     A, [USB_t1]                ; Pointer MSB
023B: 58 3D    MOV   X,[USB_t0]    (0344)     MOV     X, [USB_t1+1]              ; Pointer LSB
                                   (0345)     
023D: 08       PUSH  A             (0346)     PUSH    A                          ; Save the MSB
                                   (0347)     
023E: 5D 52    MOV   A,REG[82]     (0348)     MOV     A, REG[USB_EP0DATA+wValueLo]  ; Get the descrptor index
0240: 53 3B    MOV   [USB_t2],A    (0349)     MOV     [USB_t2], A  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -