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

📄 usb_regs.s79

📁 用于监视I2C通信总线
💻 S79
📖 第 1 页 / 共 5 页
字号:
        BL       GetENDPOINT
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        ADDS     R1,R1,R4, LSL #+2
        CMP      R5,#+1
        BNE.N    ??SetDouBleBuffEPStall_0
//  223   if (bDir == EP_DBUF_OUT)
//  224   { /* OUT double buffered endpoint */
//  225     _SetENDPOINT(bEpNum, Endpoint_DTOG_Status & ~EPRX_DTOG1);
        MVNS     R2,#+4096
        ANDS     R2,R2,R0
        STR      R2,[R1, #+0]
        POP      {R4,R5,PC}
//  226   }
//  227   else if (bDir == EP_DBUF_IN)
??SetDouBleBuffEPStall_0:
        CMP      R5,#+2
        ITTT    EQ 
//  228   { /* IN double buffered endpoint */
//  229     _SetENDPOINT(bEpNum, Endpoint_DTOG_Status & ~EPTX_DTOG1);
        MOVEQ    R2,#+16
        BICEQ    R0,R0,R2
        STREQ    R0,[R1, #+0]
//  230   }
//  231 }
        POP      {R4,R5,PC}       ;; return
        CFI EndBlock cfiBlock16
//  232 
//  233 /*******************************************************************************
//  234 * Function Name  : GetEPTxStatus
//  235 * Description    : Returns the endpoint Tx status.
//  236 * Input          : bEpNum: Endpoint Number. 
//  237 * Output         : None.
//  238 * Return         : Endpoint TX Status
//  239 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock17 Using cfiCommon0
        CFI Function GetEPTxStatus
        THUMB
//  240 u16 GetEPTxStatus(u8 bEpNum)
//  241 {
//  242   return(_GetEPTxStatus(bEpNum));
GetEPTxStatus:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR      R0,[R1, R0, LSL #+2]
        ANDS     R0,R0,#0x30
        BX       LR               ;; return
        CFI EndBlock cfiBlock17
//  243 }
//  244 
//  245 /*******************************************************************************
//  246 * Function Name  : GetEPRxStatus
//  247 * Description    : Returns the endpoint Rx status.
//  248 * Input          : bEpNum: Endpoint Number. 
//  249 * Output         : None.
//  250 * Return         : Endpoint RX Status
//  251 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock18 Using cfiCommon0
        CFI Function GetEPRxStatus
        THUMB
//  252 u16 GetEPRxStatus(u8 bEpNum)
//  253 {
//  254   return(_GetEPRxStatus(bEpNum));
GetEPRxStatus:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR      R0,[R1, R0, LSL #+2]
        ANDS     R0,R0,#0x3000
        BX       LR               ;; return
        CFI EndBlock cfiBlock18
//  255 }
//  256 
//  257 /*******************************************************************************
//  258 * Function Name  : SetEPTxValid
//  259 * Description    : Valid the endpoint Tx Status.
//  260 * Input          : bEpNum: Endpoint Number.  
//  261 * Output         : None.
//  262 * Return         : None.
//  263 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock19 Using cfiCommon0
        CFI Function SetEPTxValid
        THUMB
//  264 void SetEPTxValid(u8 bEpNum)
//  265 {
SetEPTxValid:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        ADDS     R0,R1,R0, LSL #+2
        LDR.N    R1,??DataTable20  ;; 0x8fbf
        LDR      R2,[R0, #+0]
        ANDS     R1,R1,R2
//  266   _SetEPTxStatus(bEpNum, EP_TX_VALID);
        EORS     R1,R1,#0x30
        STR      R1,[R0, #+0]
//  267 }
        BX       LR               ;; return
        CFI EndBlock cfiBlock19

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable20:
        DC32     0x8fbf
//  268 
//  269 /*******************************************************************************
//  270 * Function Name  : SetEPRxValid
//  271 * Description    : Valid the endpoint Rx Status.
//  272 * Input          : bEpNum: Endpoint Number. 
//  273 * Output         : None.
//  274 * Return         : None.
//  275 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock20 Using cfiCommon0
        CFI Function SetEPRxValid
        THUMB
//  276 void SetEPRxValid(u8 bEpNum)
//  277 {
SetEPRxValid:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        ADDS     R0,R1,R0, LSL #+2
        LDR.N    R1,??DataTable22  ;; 0xbf8f
        LDR      R2,[R0, #+0]
        ANDS     R1,R1,R2
//  278   _SetEPRxStatus(bEpNum, EP_RX_VALID);
        EORS     R1,R1,#0x3000
        STR      R1,[R0, #+0]
//  279 }
        BX       LR               ;; return
        CFI EndBlock cfiBlock20

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable22:
        DC32     0xbf8f
//  280 
//  281 /*******************************************************************************
//  282 * Function Name  : SetEP_KIND
//  283 * Description    : Clear the EP_KIND bit.
//  284 * Input          : bEpNum: Endpoint Number. 
//  285 * Output         : None.
//  286 * Return         : None.
//  287 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock21 Using cfiCommon0
        CFI Function SetEP_KIND
        THUMB
//  288 void SetEP_KIND(u8 bEpNum)
SetEP_KIND:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR.N    R2,??DataTable48  ;; 0x8f8f
        ADDS     R0,R1,R0, LSL #+2
        LDR      R1,[R0, #+0]
        ORRS     R1,R1,#0x100
        B.N      ??Subroutine1_0
        CFI EndBlock cfiBlock21
//  289 {
//  290   _SetEP_KIND(bEpNum);
//  291 }
//  292 
//  293 /*******************************************************************************
//  294 * Function Name  : ClearEP_KIND
//  295 * Description    : set the  EP_KIND bit.
//  296 * Input          : bEpNum: Endpoint Number. 
//  297 * Output         : None.
//  298 * Return         : None.
//  299 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock22 Using cfiCommon0
        CFI Function ClearEP_KIND
        THUMB
//  300 void ClearEP_KIND(u8 bEpNum)
ClearEP_KIND:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR.N    R2,??DataTable34  ;; 0x8e8f
        ADDS     R0,R1,R0, LSL #+2
        B.N      ?Subroutine1
        CFI EndBlock cfiBlock22
//  301 {
//  302   _ClearEP_KIND(bEpNum);
//  303 }
//  304 /*******************************************************************************
//  305 * Function Name  : Clear_Status_Out
//  306 * Description    : Clear the Status Out of the related Endpoint
//  307 * Input          : bEpNum: Endpoint Number. 
//  308 * Output         : None.
//  309 * Return         : None.
//  310 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock23 Using cfiCommon0
        CFI Function Clear_Status_Out
        THUMB
//  311 void Clear_Status_Out(u8 bEpNum)
Clear_Status_Out:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR.N    R2,??DataTable34  ;; 0x8e8f
        ADDS     R0,R1,R0, LSL #+2
        CFI EndBlock cfiBlock23
        REQUIRE ?Subroutine1
        ;; // Fall through to label ?Subroutine1

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock24 Using cfiCommon0
        CFI NoFunction
        THUMB
?Subroutine1:
        LDR      R1,[R0, #+0]
??Subroutine1_0:
        ANDS     R2,R2,R1
        STR      R2,[R0, #+0]
        BX       LR               ;; return
        CFI EndBlock cfiBlock24
//  312 {
//  313   _ClearEP_KIND(bEpNum);
//  314 }
//  315 /*******************************************************************************
//  316 * Function Name  : Set_Status_Out
//  317 * Description    : Set the Status Out of the related Endpoint
//  318 * Input          : bEpNum: Endpoint Number. 
//  319 * Output         : None.
//  320 * Return         : None.
//  321 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock25 Using cfiCommon0
        CFI Function Set_Status_Out
        THUMB
//  322 void Set_Status_Out(u8 bEpNum)
Set_Status_Out:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR.N    R2,??DataTable48  ;; 0x8f8f
        ADDS     R0,R1,R0, LSL #+2
        LDR      R1,[R0, #+0]
        ORRS     R1,R1,#0x100
        B.N      ??Subroutine1_0
        CFI EndBlock cfiBlock25
//  323 {
//  324   _SetEP_KIND(bEpNum);
//  325 }
//  326 /*******************************************************************************
//  327 * Function Name  : SetEPDoubleBuff
//  328 * Description    : Enable the double buffer feature for the endpoint. 
//  329 * Input          : bEpNum: Endpoint Number. 
//  330 * Output         : None.
//  331 * Return         : None.
//  332 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock26 Using cfiCommon0
        CFI Function SetEPDoubleBuff
        THUMB
//  333 void SetEPDoubleBuff(u8 bEpNum)
SetEPDoubleBuff:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR.N    R2,??DataTable48  ;; 0x8f8f
        ADDS     R0,R1,R0, LSL #+2
        LDR      R1,[R0, #+0]
        ORRS     R1,R1,#0x100
        B.N      ??Subroutine1_0
        CFI EndBlock cfiBlock26
//  334 {
//  335   _SetEP_KIND(bEpNum);
//  336 }
//  337 /*******************************************************************************
//  338 * Function Name  : ClearEPDoubleBuff
//  339 * Description    : Disable the double buffer feature for the endpoint. 
//  340 * Input          : bEpNum: Endpoint Number. 
//  341 * Output         : None.
//  342 * Return         : None.
//  343 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock27 Using cfiCommon0
        CFI Function ClearEPDoubleBuff
        THUMB
//  344 void ClearEPDoubleBuff(u8 bEpNum)
ClearEPDoubleBuff:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR.N    R2,??DataTable34  ;; 0x8e8f
        ADDS     R0,R1,R0, LSL #+2
        B.N      ?Subroutine1
        CFI EndBlock cfiBlock27

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable34:
        DC32     0x8e8f
//  345 {
//  346   _ClearEP_KIND(bEpNum);
//  347 }
//  348 /*******************************************************************************
//  349 * Function Name  : GetTxStallStatus
//  350 * Description    : Returns the Stall status of the Tx endpoint.
//  351 * Input          : bEpNum: Endpoint Number. 
//  352 * Output         : None.
//  353 * Return         : Tx Stall status.
//  354 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock28 Using cfiCommon0
        CFI Function GetTxStallStatus
        THUMB
//  355 u16 GetTxStallStatus(u8 bEpNum)
//  356 {
//  357   return(_GetTxStallStatus(bEpNum));
GetTxStallStatus:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR      R0,[R1, R0, LSL #+2]
        ANDS     R0,R0,#0x30
        CMP      R0,#+16
        ITT     EQ 
        MOVEQ    R0,#+1
        BXEQ     LR
        MOVS     R0,#+0
        BX       LR               ;; return
        CFI EndBlock cfiBlock28
//  358 }
//  359 /*******************************************************************************
//  360 * Function Name  : GetRxStallStatus
//  361 * Description    : Returns the Stall status of the Rx endpoint. 
//  362 * Input          : bEpNum: Endpoint Number. 
//  363 * Output         : None.
//  364 * Return         : Rx Stall status.
//  365 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock29 Using cfiCommon0
        CFI Function GetRxStallStatus
        THUMB
//  366 u16 GetRxStallStatus(u8 bEpNum)
//  367 {
//  368   return(_GetRxStallStatus(bEpNum));
GetRxStallStatus:
        LDR.N    R1,??DataTable49  ;; 0x40005c00
        LDR      R0,[R1, R0, LSL #+2]
        ANDS     R0,R0,#0x3000
        CMP      R0,#+4096
        ITT     EQ 
        MOVEQ    R0,#+1
        BXEQ     LR
        MOVS     R0,#+0
        BX       LR               ;; return
        CFI EndBlock cfiBlock29
//  369 }
//  370 /*******************************************************************************
//  371 * Function Name  : ClearEP_CTR_RX
//  372 * Description    : Clear the CTR_RX bit.
//  373 * Input          : bEpNum: Endpoint Number. 
//  374 * Output         : None.
//  375 * Return         : None.
//  376 *******************************************************************************/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock30 Using cfiCommon0
        CFI Function ClearEP_CTR_RX
        THUMB
//  377 void ClearEP_CTR_RX(u8 bEpNum)

⌨️ 快捷键说明

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