📄 usb_regs.s79
字号:
// 58 void SetISTR(u16 wRegValue)
// 59 {
// 60 _SetISTR(wRegValue);
SetISTR:
LDR.N R1,??DataTable3 ;; 0x40005c44
STR R0,[R1, #+0]
// 61 }
BX LR ;; return
CFI EndBlock cfiBlock2
// 62
// 63 /*******************************************************************************
// 64 * Function Name : GetISTR
// 65 * Description : Returns the ISTR register value.
// 66 * Input : None.
// 67 * Output : None.
// 68 * Return : ISTR register Value
// 69 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock3 Using cfiCommon0
CFI Function GetISTR
THUMB
// 70 u16 GetISTR(void)
// 71 {
// 72 return(_GetISTR());
GetISTR:
LDR.N R0,??DataTable3 ;; 0x40005c44
Nop
CFI EndBlock cfiBlock3
REQUIRE ?Subroutine2
;; // Fall through to label ?Subroutine2
// 73 }
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock4 Using cfiCommon0
CFI NoFunction
THUMB
?Subroutine2:
LDR R0,[R0, #+0]
UXTH R0,R0
BX LR ;; return
CFI EndBlock cfiBlock4
RSEG CODE:CODE:NOROOT(2)
DATA
??DataTable3:
DC32 0x40005c44
// 74
// 75 /*******************************************************************************
// 76 * Function Name : GetFNR
// 77 * Description : Returns the FNR register value.
// 78 * Input : None.
// 79 * Output : None.
// 80 * Return : FNR register Value
// 81 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock5 Using cfiCommon0
CFI Function GetFNR
THUMB
// 82 u16 GetFNR(void)
// 83 {
// 84 return(_GetFNR());
GetFNR:
LDR.N R0,??GetFNR_0 ;; 0x40005c48
B.N ?Subroutine2
DATA
??GetFNR_0:
DC32 0x40005c48
CFI EndBlock cfiBlock5
// 85 }
// 86
// 87 /*******************************************************************************
// 88 * Function Name : SetDADDR
// 89 * Description : Set the DADDR register value.
// 90 * Input : wRegValue: new register value.
// 91 * Output : None.
// 92 * Return : None.
// 93 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock6 Using cfiCommon0
CFI Function SetDADDR
THUMB
// 94 void SetDADDR(u16 wRegValue)
// 95 {
// 96 _SetDADDR(wRegValue);
SetDADDR:
LDR.N R1,??DataTable5 ;; 0x40005c4c
STR R0,[R1, #+0]
// 97 }
BX LR ;; return
CFI EndBlock cfiBlock6
// 98
// 99 /*******************************************************************************
// 100 * Function Name : GetDADDR
// 101 * Description : Returns the DADDR register value.
// 102 * Input : None.
// 103 * Output : None.
// 104 * Return : DADDR register Value
// 105 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock7 Using cfiCommon0
CFI Function GetDADDR
THUMB
// 106 u16 GetDADDR(void)
// 107 {
// 108 return(_GetDADDR());
GetDADDR:
LDR.N R0,??DataTable5 ;; 0x40005c4c
B.N ?Subroutine2
CFI EndBlock cfiBlock7
// 109 }
RSEG CODE:CODE:NOROOT(2)
DATA
??DataTable5:
DC32 0x40005c4c
// 110
// 111 /*******************************************************************************
// 112 * Function Name : SetBTABLE
// 113 * Description : Set the BTABLE.
// 114 * Input : wRegValue: New register value.
// 115 * Output : None.
// 116 * Return : None.
// 117 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock8 Using cfiCommon0
CFI Function SetBTABLE
THUMB
// 118 void SetBTABLE(u16 wRegValue)
// 119 {
// 120 _SetBTABLE(wRegValue);
SetBTABLE:
LDR.N R1,??DataTable58 ;; 0x40005c50
LDR.N R2,??SetBTABLE_0 ;; 0xfff8
ANDS R2,R2,R0
STR R2,[R1, #+0]
// 121 }
BX LR ;; return
Nop
DATA
??SetBTABLE_0:
DC32 0xfff8
CFI EndBlock cfiBlock8
// 122
// 123 /*******************************************************************************
// 124 * Function Name : GetBTABLE.
// 125 * Description : Returns the BTABLE register value.
// 126 * Input : None.
// 127 * Output : None.
// 128 * Return : BTABLE address.
// 129 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock9 Using cfiCommon0
CFI Function GetBTABLE
THUMB
// 130 u16 GetBTABLE(void)
// 131 {
// 132 return(_GetBTABLE());
GetBTABLE:
LDR.N R0,??DataTable58 ;; 0x40005c50
B.N ?Subroutine2
CFI EndBlock cfiBlock9
// 133 }
// 134
// 135 /*******************************************************************************
// 136 * Function Name : SetENDPOINT
// 137 * Description : Setthe Endpoint register value.
// 138 * Input : bEpNum: Endpoint Number.
// 139 * wRegValue.
// 140 * Output : None.
// 141 * Return : None.
// 142 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock10 Using cfiCommon0
CFI Function SetENDPOINT
THUMB
// 143 void SetENDPOINT(u8 bEpNum, u16 wRegValue)
// 144 {
// 145 _SetENDPOINT(bEpNum, wRegValue);
SetENDPOINT:
LDR.N R2,??DataTable49 ;; 0x40005c00
STR R1,[R2, R0, LSL #+2]
// 146 }
BX LR ;; return
CFI EndBlock cfiBlock10
// 147
// 148 /*******************************************************************************
// 149 * Function Name : GetENDPOINT
// 150 * Description : Return the Endpoint register value.
// 151 * Input : bEpNum: Endpoint Number.
// 152 * Output : None.
// 153 * Return : Endpoint register value.
// 154 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock11 Using cfiCommon0
CFI Function GetENDPOINT
THUMB
// 155 u16 GetENDPOINT(u8 bEpNum)
// 156 {
// 157 return(_GetENDPOINT(bEpNum));
GetENDPOINT:
LDR.N R1,??DataTable49 ;; 0x40005c00
LDR R0,[R1, R0, LSL #+2]
UXTH R0,R0
BX LR ;; return
CFI EndBlock cfiBlock11
// 158 }
// 159
// 160 /*******************************************************************************
// 161 * Function Name : SetEPType
// 162 * Description : sets the type in the endpoint register.
// 163 * Input : bEpNum: Endpoint Number.
// 164 * wType: type definition.
// 165 * Output : None.
// 166 * Return : None.
// 167 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock12 Using cfiCommon0
CFI Function SetEPType
THUMB
// 168 void SetEPType(u8 bEpNum, u16 wType)
SetEPType:
LDR.N R2,??DataTable49 ;; 0x40005c00
LDR.N R3,??SetEPType_0 ;; 0x898f
ADDS R0,R2,R0, LSL #+2
B.N ?Subroutine0
Nop
DATA
??SetEPType_0:
DC32 0x898f
CFI EndBlock cfiBlock12
// 169 {
// 170 _SetEPType(bEpNum, wType);
// 171 }
// 172
// 173 /*******************************************************************************
// 174 * Function Name : GetEPType
// 175 * Description : Returns the endpoint type.
// 176 * Input : bEpNum: Endpoint Number.
// 177 * Output : None.
// 178 * Return : Endpoint Type
// 179 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock13 Using cfiCommon0
CFI Function GetEPType
THUMB
// 180 u16 GetEPType(u8 bEpNum)
// 181 {
// 182 return(_GetEPType(bEpNum));
GetEPType:
LDR.N R1,??DataTable49 ;; 0x40005c00
LDR R0,[R1, R0, LSL #+2]
ANDS R0,R0,#0x600
BX LR ;; return
CFI EndBlock cfiBlock13
// 183 }
// 184
// 185 /*******************************************************************************
// 186 * Function Name : SetEPTxStatus
// 187 * Description : Set the status of Tx endpoint.
// 188 * Input : bEpNum: Endpoint Number.
// 189 * wState: new state.
// 190 * Output : None.
// 191 * Return : None.
// 192 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock14 Using cfiCommon0
CFI Function SetEPTxStatus
THUMB
// 193 void SetEPTxStatus(u8 bEpNum, u16 wState)
// 194 {
SetEPTxStatus:
LDR.N R2,??DataTable49 ;; 0x40005c00
ADDS R0,R2,R0, LSL #+2
LDR.N R2,??DataTable20 ;; 0x8fbf
LDR R3,[R0, #+0]
ANDS R2,R2,R3
// 195 _SetEPTxStatus(bEpNum, wState);
LSLS R3,R1,#+27
IT MI
EORSMI R2,R2,#0x10
LSLS R1,R1,#+26
BPL.N ??SetEPTxStatus_0
EORS R2,R2,#0x20
UXTH R2,R2
??SetEPTxStatus_0:
STR R2,[R0, #+0]
// 196 }
BX LR ;; return
CFI EndBlock cfiBlock14
// 197
// 198 /*******************************************************************************
// 199 * Function Name : SetEPRxStatus
// 200 * Description : Set the status of Rx endpoint.
// 201 * Input : bEpNum: Endpoint Number.
// 202 * wState: new state.
// 203 * Output : None.
// 204 * Return : None.
// 205 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock15 Using cfiCommon0
CFI Function SetEPRxStatus
THUMB
// 206 void SetEPRxStatus(u8 bEpNum, u16 wState)
// 207 {
SetEPRxStatus:
LDR.N R2,??DataTable49 ;; 0x40005c00
ADDS R0,R2,R0, LSL #+2
LDR.N R2,??DataTable22 ;; 0xbf8f
LDR R3,[R0, #+0]
ANDS R2,R2,R3
// 208 _SetEPRxStatus(bEpNum, wState);
LSLS R3,R1,#+19
IT MI
EORSMI R2,R2,#0x1000
LSLS R1,R1,#+18
BPL.N ??SetEPRxStatus_0
EORS R2,R2,#0x2000
UXTH R2,R2
??SetEPRxStatus_0:
STR R2,[R0, #+0]
// 209 }
BX LR ;; return
CFI EndBlock cfiBlock15
// 210
// 211 /*******************************************************************************
// 212 * Function Name : SetDouBleBuffEPStall
// 213 * Description : sets the status for Double Buffer Endpoint to STALL
// 214 * Input : bEpNum: Endpoint Number.
// 215 * bDir: Endpoint direction.
// 216 * Output : None.
// 217 * Return : None.
// 218 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock16 Using cfiCommon0
CFI Function SetDouBleBuffEPStall
THUMB
// 219 void SetDouBleBuffEPStall(u8 bEpNum, u8 bDir)
// 220 {
SetDouBleBuffEPStall:
PUSH {R4,R5,LR}
CFI ?RET Frame(CFA, -4)
CFI R5 Frame(CFA, -8)
CFI R4 Frame(CFA, -12)
CFI CFA R13+12
MOVS R4,R0
MOVS R5,R1
// 221 u16 Endpoint_DTOG_Status;
// 222 Endpoint_DTOG_Status = GetENDPOINT(bEpNum);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -