📄 usbprinterdriver.lst
字号:
\ 00000004 0040A0E1 MOV R4,R0
108 TRACE_INFO_WP("NewReq ");
\ 00000008 38009FE5 LDR R0,??USBPrinterDriver_RequestHandler_0 ;; `?<Constant "NewReq ">`
\ 0000000C ........ BL printf
109
110 // Handle the request
111 switch (USBGenericRequest_GetRequest(request)) {
\ 00000010 0400A0E1 MOV R0,R4
\ 00000014 ........ BL USBGenericRequest_GetRequest
\ 00000018 170050E2 SUBS R0,R0,#+23
\ 0000001C 0300000A BEQ ??USBPrinterDriver_RequestHandler_1
\ 00000020 010050E2 SUBS R0,R0,#+1
\ 00000024 0300001A BNE ??USBPrinterDriver_RequestHandler_2
112
113 case USBPrinterGenericRequest_UpdataReday:
114 USBPrinter_HandleUpdataReday();
\ 00000028 1040BDE8 POP {R4,LR}
\ 0000002C ........ B USBPrinter_HandleUpdataReday ;; tailcall
115 break;
116 case USBPrinterGenericRequest_UpdataStart:
117 USBPrinter_HandleUpdataStart();
\ ??USBPrinterDriver_RequestHandler_1:
\ 00000030 1040BDE8 POP {R4,LR}
\ 00000034 ........ B USBPrinter_HandleUpdataStart ;; tailcall
118 break;
119 default:
120 USBDDriver_RequestHandler(&(usbPrinterDriver.usbdDriver), request);
\ ??USBPrinterDriver_RequestHandler_2:
\ 00000038 0410A0E1 MOV R1,R4
\ 0000003C ........ LDR R0,??DataTable1 ;; usbPrinterDriver
121 break;
122 }
123 }
\ 00000040 1040BDE8 POP {R4,LR}
\ 00000044 ........ B USBDDriver_RequestHandler ;; tailcall
\ ??USBPrinterDriver_RequestHandler_0:
\ 00000048 ........ DC32 `?<Constant "NewReq ">`
124
125 //------------------------------------------------------------------------------
126 /// Receives data from the host through the virtual COM port created by
127 /// the CDC device serial driver. This function behaves like USBD_Read.
128 /// \param data Pointer to the data buffer to put received data.
129 /// \param size Size of the data buffer in bytes.
130 /// \param callback Optional callback function to invoke when the transfer
131 /// finishes.
132 /// \param argument Optional argument to the callback function.
133 /// \return USBD_STATUS_SUCCESS if the read operation has been started normally;
134 /// otherwise, the corresponding error code.
135 //------------------------------------------------------------------------------
\ In section .text, align 4, keep-with-next
136 unsigned char USBPrinterDriver_Read(void *data,
137 unsigned int size,
138 TransferCallback callback,
139 void *argument)
140 {
\ USBPrinterDriver_Read:
\ 00000000 01402DE9 PUSH {R0,LR}
141 return USBD_Read(USBPrinterDriverDescriptors_DATAOUT,
142 data,
143 size,
144 callback,
145 argument);
\ 00000004 08D04DE2 SUB SP,SP,#+8
\ 00000008 00308DE5 STR R3,[SP, #+0]
\ 0000000C 0230A0E1 MOV R3,R2
\ 00000010 0120A0E1 MOV R2,R1
\ 00000014 0010A0E1 MOV R1,R0
\ 00000018 0100A0E3 MOV R0,#+1
\ 0000001C ........ BL USBD_Read
\ 00000020 ........ B ?Subroutine0
146 }
\ In section .text, align 4, keep-with-next
\ ?Subroutine0:
\ 00000000 08D08DE2 ADD SP,SP,#+8 ;; stack cleaning
\ 00000004 0050BDE8 POP {R12,LR}
\ 00000008 1EFF2FE1 BX LR ;; return
147
148 //------------------------------------------------------------------------------
149 /// Sends a data buffer through the virtual COM port created by the CDC
150 /// device serial driver. This function behaves exactly like USBD_Write.
151 /// \param data Pointer to the data buffer to send.
152 /// \param size Size of the data buffer in bytes.
153 /// \param callback Optional callback function to invoke when the transfer
154 /// finishes.
155 /// \param argument Optional argument to the callback function.
156 /// \return USBD_STATUS_SUCCESS if the read operation has been started normally;
157 /// otherwise, the corresponding error code.
158 //------------------------------------------------------------------------------
\ In section .text, align 4, keep-with-next
159 unsigned char USBPrinterDriver_Write(void *data,
160 unsigned int size,
161 TransferCallback callback,
162 void *argument)
163 {
\ USBPrinterDriver_Write:
\ 00000000 01402DE9 PUSH {R0,LR}
164 return USBD_Write(USBPrinterDriverDescriptors_DATAIN,
165 data,
166 size,
167 callback,
168 argument);
\ 00000004 08D04DE2 SUB SP,SP,#+8
\ 00000008 00308DE5 STR R3,[SP, #+0]
\ 0000000C 0230A0E1 MOV R3,R2
\ 00000010 0120A0E1 MOV R2,R1
\ 00000014 0010A0E1 MOV R1,R0
\ 00000018 0200A0E3 MOV R0,#+2
\ 0000001C ........ BL USBD_Write
\ 00000020 REQUIRE ?Subroutine0
\ 00000020 ;; // Fall through to label ?Subroutine0
169 }
\ In section .text, align 4, keep-with-next
\ ??DataTable1:
\ 00000000 ........ DC32 usbPrinterDriver
\ In section .rodata, align 4
\ `?<Constant "-I- USBPrinterDriver_...">`:
\ 00000000 2D492D205553 DC8 "-I- USBPrinterDriver_Initialize\012\015"
\ 425072696E74
\ 657244726976
\ 65725F496E69
\ 7469616C697A
\ 650A0D00
\ 00000022 0000 DC8 0, 0
\ In section .rodata, align 4
\ `?<Constant "NewReq ">`:
\ 00000000 4E6577526571 DC8 "NewReq "
\ 2000
170
Maximum stack usage in bytes:
Function .cstack
-------- -------
USBDCallbacks_RequestReceived 8
USBPrinterDriver_Initialize 8
USBPrinterDriver_Read 16
USBPrinterDriver_RequestHandler
8
USBPrinterDriver_Write 16
Section sizes:
Function/Label Bytes
-------------- -----
usbPrinterDriver 12
USBDCallbacks_RequestReceived 12
USBPrinterDriver_Initialize 44
USBPrinterDriver_RequestHandler
76
USBPrinterDriver_Read 36
?Subroutine0 12
USBPrinterDriver_Write 32
??DataTable1 4
?<Constant "-I- USBPrinterDriver_...">
36
?<Constant "NewReq "> 8
12 bytes in section .bss
44 bytes in section .rodata
216 bytes in section .text
216 bytes of CODE memory
44 bytes of CONST memory
12 bytes of DATA memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -