📄 ms_rbc.lst
字号:
\ 0000010E E169 LDR R1,[R4, #+28]
\ 00000110 8142 CMP R1,R0
\ 00000112 05D1 BNE ??rbc_commun_write_14
486 {
487 /* compute CSW and send it */
488 ms_send_bot_status(GOOD_STATUS,0);
\ 00000114 0021 MOV R1,#+0
\ 00000116 0020 MOV R0,#+0
\ 00000118 ........ _BLF ms_send_bot_status,??ms_send_bot_status??rT
489 usbms_context.state = PROCESS_CSW;
\ 0000011C 0520 MOV R0,#+5
\ 0000011E 0CE0 B ??rbc_commun_write_15
490 }
491 else
492 {
493 /* the processing is in progress */
494 usbms_context.state = GET_FROM_USB;
\ ??rbc_commun_write_14:
\ 00000120 0120 MOV R0,#+1
\ 00000122 0AE0 B ??rbc_commun_write_15
495 }
496 }
497 else
498 {
499 /* Error write flash */
500 _status = USBMS_ERROR;
\ ??rbc_commun_write_13:
\ 00000124 0021 MOV R1,#+0
\ 00000126 C943 MVN R1,R1 ;; #-1
\ 00000128 0171 STRB R1,[R0, #+4]
501 ms_stallPipe(FW_EP_BULK_OUT);
\ 0000012A 0220 MOV R0,#+2
\ 0000012C ........ _BLF ms_stallPipe,??ms_stallPipe??rT
502 ms_computeCSW(COMMAND_FAILED,_expected);
\ 00000130 0099 LDR R1,[SP, #+0]
\ 00000132 0120 MOV R0,#+1
\ 00000134 ........ _BLF ms_computeCSW,??ms_computeCSW??rT
503 usbms_context.state = RESET_IN_PROGRESS;
\ 00000138 0420 MOV R0,#+4
\ ??rbc_commun_write_15:
\ 0000013A A876 STRB R0,[R5, #+26]
504 }
505 po_free(_buff);
\ 0000013C 301C MOV R0,R6
\ 0000013E ........ _BLF po_free,??po_free??rT
506
507 return _status;
\ 00000142 6946 MOV R1,SP
\ 00000144 0420 MOV R0,#+4
\ 00000146 0856 LDRSB R0,[R1, R0]
\ ??rbc_commun_write_4:
\ 00000148 04B0 ADD SP,#+16
\ 0000014A F0BC POP {R4-R7}
\ 0000014C 02BC POP {R1}
\ 0000014E 0847 BX R1 ;; return
\ ??rbc_commun_write_1:
\ 00000150 ........ DC32 usbms_context + 185
508 }
509
510
511 /*****************************************************************
512 *
513 * ROUTINE : rbc_write_10
514 *
515 *-----------------------------------------------------------------
516 *
517 * Purpose : processes the rbc WRITE_10 command
518 *
519 * Input Parameters : Structure defining the WRITE_10 command
520 *
521 * Output Parameters : status of the operation
522 *
523 *****************************************************************/
\ In segment CODE, align 4, keep-with-next
524 USBMS_RETURN rbc_write_10(USBMS_WRITE_10 *write_10)
525 {
\ rbc_write_10:
\ 00000000 10B5 PUSH {R4,LR}
\ 00000002 011C MOV R1,R0
526 USBMS_XFER *_request = NULL;
527 USB_LUN *_lun = NULL;
528
529 /* Initialize the temporary variables */
530 _request = &usbms_context.usb_lun[usbms_context.current_lun].cur_request;
\ 00000004 .... LDR R0,??DataTable5 ;; usbms_context
\ 00000006 B922 MOV R2,#+185
\ 00000008 825C LDRB R2,[R0, R2]
\ 0000000A 3823 MOV R3,#+56
\ 0000000C 5A43 MUL R2,R3
\ 0000000E 8218 ADD R2,R0,R2
\ 00000010 101C MOV R0,R2
\ 00000012 1030 ADD R0,#+16
531 _lun = &usbms_context.usb_lun[usbms_context.current_lun];
532
533 /* Transaction Initialization */
534 _request->current_block = VALUE_32( write_10->block_address_0,
535 write_10->block_address_1,
536 write_10->block_address_2,
537 write_10->block_address_3 );
\ 00000014 4B79 LDRB R3,[R1, #+5]
\ 00000016 0C79 LDRB R4,[R1, #+4]
\ 00000018 2402 LSL R4,R4,#+8
\ 0000001A 1C43 ORR R4,R3
\ 0000001C 0480 STRH R4,[R0, #+0]
538
539 /* Retreive total amount of blocks to transfer */
540 _request->command_size = (write_10->xfer_len_1<<8) | (write_10->xfer_len_0);
\ 0000001E CB79 LDRB R3,[R1, #+7]
\ 00000020 1B02 LSL R3,R3,#+8
\ 00000022 097A LDRB R1,[R1, #+8]
\ 00000024 1943 ORR R1,R3
\ 00000026 0162 STR R1,[R0, #+32]
541
542 /* COMMUN WRITE */
543 rbc_commun_write( _request, _lun );
\ 00000028 111C MOV R1,R2
\ 0000002A ........ BL rbc_commun_write
\ 0000002E C046 NOP
544
545 return( USBMS_OK );
\ 00000030 REQUIRE ?Subroutine12
\ 00000030 ;; // Fall through to label ?Subroutine12
546 }
547
548
549 /*****************************************************************
550 *
551 * ROUTINE : rbc_verify_10
552 *
553 *-----------------------------------------------------------------
554 *
555 * Purpose : processes the rbc VERIFY command
556 *
557 * Input Parameters : Structure defining the VERIFY command
558 *
559 * Output Parameters : status of the operation
560 *
561 *****************************************************************/
\ In segment CODE, align 4, keep-with-next
562 USBMS_RETURN rbc_verify_10(void)
563 {
564 return USBMS_OK;
\ rbc_verify_10:
\ 00000000 0020 MOV R0,#+0
\ 00000002 7047 BX LR ;; return
565 }
566
567
568 /*****************************************************************
569 *
570 * ROUTINE : rbc_request_sense
571 *
572 *-----------------------------------------------------------------
573 *
574 * Purpose : processes the rbc REQUEST_SENSE command
575 *
576 * Input Parameters : Structure defining the REQUEST_SENSE command
577 *
578 * Output Parameters : status of the operation
579 *
580 *****************************************************************/
\ In segment CODE, align 4, keep-with-next
581 USBMS_RETURN rbc_request_sense(void)
582 {
\ rbc_request_sense:
\ 00000000 00B5 PUSH {LR}
583 usb_send((char *)&usbms_request_sense_data,sizeof(usbms_request_sense_data));
\ 00000002 1221 MOV R1,#+18
\ 00000004 .... LDR R0,??Subroutine13_0 ;; usbms_request_sense_data
\ 00000006 ........ _BLF usb_send,??usb_send??rT
\ 0000000A C046 NOP
584 return( USBMS_OK );
\ 0000000C REQUIRE ?Subroutine13
\ 0000000C ;; // Fall through to label ?Subroutine13
585 }
\ In segment CODE, align 4, keep-with-next
\ ??DataTable5:
\ 00000000 ........ DC32 usbms_context
586
587
Maximum stack usage in bytes:
Function CSTACK
-------- ------
rbc_commun_write 40
rbc_inquiry 16
rbc_mode_select 0
rbc_mode_sense 16
rbc_prevent_allow_removal 0
rbc_read_10 4
rbc_read_capacity 8
rbc_request_sense 4
rbc_start_stop_unit 0
rbc_verify_10 0
rbc_write_10 8
Segment part sizes:
Function/Label Bytes
-------------- -----
rbc_inquiry 104
?Subroutine11 6
rbc_mode_select 4
rbc_mode_sense 194
rbc_prevent_allow_removal 4
rbc_start_stop_unit 4
rbc_read_capacity 66
?Subroutine12 8
rbc_read_10 30
?Subroutine13 12
rbc_commun_write 340
rbc_write_10 48
rbc_verify_10 4
rbc_request_sense 12
??DataTable5 4
Others 200
1 040 bytes in segment CODE
840 bytes of CODE memory (+ 200 bytes shared)
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -