📄 bsp_ser.lst
字号:
450 * BSP_Ser_WrByteUnlocked()
451 *
452 * Note(s) : (1) This function blocks until room is available in the UART for the byte to be sent.
453 *********************************************************************************************************
454 */
455
\ In section .text, align 2, keep-with-next
456 void BSP_Ser_WrByteUnlocked (CPU_INT08U c)
457 {
\ BSP_Ser_WrByteUnlocked:
\ 00000000 10B5 PUSH {R4,LR}
\ 00000002 0400 MOVS R4,R0
458 USART_ITConfig(USART2, USART_IT_TC, ENABLE);
\ 00000004 0122 MOVS R2,#+1
\ 00000006 40F22661 MOVW R1,#+1574
\ 0000000A .... LDR.N R0,??DataTable10_4 ;; 0x40004400
\ 0000000C ........ BL USART_ITConfig
459 USART_SendData(USART2, c);
\ 00000010 E4B2 UXTB R4,R4 ;; ZeroExt R4,R4,#+24,#+24
\ 00000012 2100 MOVS R1,R4
\ 00000014 89B2 UXTH R1,R1 ;; ZeroExt R1,R1,#+16,#+16
\ 00000016 .... LDR.N R0,??DataTable10_4 ;; 0x40004400
\ 00000018 ........ BL USART_SendData
460 BSP_OS_SemWait(&BSP_SerTxWait, 0);
\ 0000001C 0021 MOVS R1,#+0
\ 0000001E .... LDR.N R0,??DataTable10
\ 00000020 ........ BL BSP_OS_SemWait
461 USART_ITConfig(USART2, USART_IT_TC, DISABLE);
\ 00000024 0022 MOVS R2,#+0
\ 00000026 40F22661 MOVW R1,#+1574
\ 0000002A .... LDR.N R0,??DataTable10_4 ;; 0x40004400
\ 0000002C ........ BL USART_ITConfig
462 }
\ 00000030 10BD POP {R4,PC} ;; return
463
464
465 /*
466 *********************************************************************************************************
467 * BSP_Ser_WrByte()
468 *
469 * Description : Writes a single byte to a serial port.
470 *
471 * Argument(s) : tx_byte The character to output.
472 *
473 * Return(s) : none.
474 *
475 * Caller(s) : Application.
476 *
477 * Note(s) : none.
478 *********************************************************************************************************
479 */
480
\ In section .text, align 2, keep-with-next
481 void BSP_Ser_WrByte(CPU_INT08U c)
482 {
\ BSP_Ser_WrByte:
\ 00000000 10B5 PUSH {R4,LR}
\ 00000002 0400 MOVS R4,R0
483 BSP_OS_SemWait(&BSP_SerLock, 0); /* Obtain access to the serial interface */
\ 00000004 0021 MOVS R1,#+0
\ 00000006 .... LDR.N R0,??DataTable10_2
\ 00000008 ........ BL BSP_OS_SemWait
484
485 BSP_Ser_WrByteUnlocked(c);
\ 0000000C 2000 MOVS R0,R4
\ 0000000E C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000010 ........ BL BSP_Ser_WrByteUnlocked
486
487 BSP_OS_SemPost(&BSP_SerLock); /* Release access to the serial interface */
\ 00000014 .... LDR.N R0,??DataTable10_2
\ 00000016 ........ BL BSP_OS_SemPost
488 }
\ 0000001A 10BD POP {R4,PC} ;; return
489
490
491 /*
492 *********************************************************************************************************
493 * BSP_Ser_WrStr()
494 *
495 * Description : Transmits a string.
496 *
497 * Argument(s) : p_str Pointer to the string that will be transmitted.
498 *
499 * Caller(s) : Application.
500 *
501 * Return(s) : none.
502 *
503 * Note(s) : none.
504 *********************************************************************************************************
505 */
506
\ In section .text, align 2, keep-with-next
507 void BSP_Ser_WrStr (CPU_CHAR *p_str)
508 {
\ BSP_Ser_WrStr:
\ 00000000 38B5 PUSH {R3-R5,LR}
\ 00000002 0400 MOVS R4,R0
509 CPU_BOOLEAN err;
510
511
512 if (p_str == (CPU_CHAR *)0) {
\ 00000004 002C CMP R4,#+0
\ 00000006 1DD0 BEQ.N ??BSP_Ser_WrStr_0
513 return;
514 }
515
516
517 err = BSP_OS_SemWait(&BSP_SerLock, 0); /* Obtain access to the serial interface */
\ ??BSP_Ser_WrStr_1:
\ 00000008 0021 MOVS R1,#+0
\ 0000000A .... LDR.N R0,??DataTable10_2
\ 0000000C ........ BL BSP_OS_SemWait
\ 00000010 0500 MOVS R5,R0
518 if (err != DEF_OK ) {
\ 00000012 EDB2 UXTB R5,R5 ;; ZeroExt R5,R5,#+24,#+24
\ 00000014 012D CMP R5,#+1
\ 00000016 15D1 BNE.N ??BSP_Ser_WrStr_0
519 return;
520 }
521
522 while ((*p_str) != (CPU_CHAR )0) {
\ ??BSP_Ser_WrStr_2:
\ 00000018 2078 LDRB R0,[R4, #+0]
\ 0000001A 0028 CMP R0,#+0
\ 0000001C 0FD0 BEQ.N ??BSP_Ser_WrStr_3
523 if (*p_str == ASCII_CHAR_LINE_FEED) {
\ 0000001E 2078 LDRB R0,[R4, #+0]
\ 00000020 0A28 CMP R0,#+10
\ 00000022 07D1 BNE.N ??BSP_Ser_WrStr_4
524 BSP_Ser_WrByteUnlocked(ASCII_CHAR_CARRIAGE_RETURN);
\ 00000024 0D20 MOVS R0,#+13
\ 00000026 ........ BL BSP_Ser_WrByteUnlocked
525 BSP_Ser_WrByteUnlocked(ASCII_CHAR_LINE_FEED);
\ 0000002A 0A20 MOVS R0,#+10
\ 0000002C ........ BL BSP_Ser_WrByteUnlocked
526 p_str++;
\ 00000030 641C ADDS R4,R4,#+1
\ 00000032 F1E7 B.N ??BSP_Ser_WrStr_2
527 } else {
528 BSP_Ser_WrByteUnlocked(*p_str++);
\ ??BSP_Ser_WrStr_4:
\ 00000034 2078 LDRB R0,[R4, #+0]
\ 00000036 ........ BL BSP_Ser_WrByteUnlocked
\ 0000003A 641C ADDS R4,R4,#+1
\ 0000003C ECE7 B.N ??BSP_Ser_WrStr_2
529 }
530 }
531
532 BSP_OS_SemPost(&BSP_SerLock); /* Release access to the serial interface */
\ ??BSP_Ser_WrStr_3:
\ 0000003E .... LDR.N R0,??DataTable10_2
\ 00000040 ........ BL BSP_OS_SemPost
533 }
\ ??BSP_Ser_WrStr_0:
\ 00000044 31BD POP {R0,R4,R5,PC} ;; return
\ In section .text, align 4, keep-with-next
\ ??DataTable10:
\ 00000000 ........ DC32 BSP_SerTxWait
\ In section .text, align 4, keep-with-next
\ ??DataTable10_1:
\ 00000000 ........ DC32 BSP_SerRxWait
\ In section .text, align 4, keep-with-next
\ ??DataTable10_2:
\ 00000000 ........ DC32 BSP_SerLock
\ In section .text, align 4, keep-with-next
\ ??DataTable10_3:
\ 00000000 00140140 DC32 0x40011400
\ In section .text, align 4, keep-with-next
\ ??DataTable10_4:
\ 00000000 00440040 DC32 0x40004400
\ In section .text, align 4, keep-with-next
\ ??DataTable10_5:
\ 00000000 ........ DC32 BSP_Ser_ISR_Handler
\ In section .text, align 4, keep-with-next
\ ??DataTable10_6:
\ 00000000 ........ DC32 BSP_SerRxData
\ In section .text, align 4, keep-with-next
\ `?<Constant "Serial Tx Wait">`:
\ 00000000 ; Initializer data, 16 bytes
\ 00000000 53657269616C DC8 83, 101, 114, 105, 97, 108, 32, 84, 120, 32
\ 20547820
\ 0000000A 576169740000 DC8 87, 97, 105, 116, 0, 0
\ In section .text, align 4, keep-with-next
\ `?<Constant "Serial Rx Wait">`:
\ 00000000 ; Initializer data, 16 bytes
\ 00000000 53657269616C DC8 83, 101, 114, 105, 97, 108, 32, 82, 120, 32
\ 20527820
\ 0000000A 576169740000 DC8 87, 97, 105, 116, 0, 0
\ In section .text, align 4, keep-with-next
\ `?<Constant "Serial Lock">`:
\ 00000000 ; Initializer data, 12 bytes
\ 00000000 53657269616C DC8 83, 101, 114, 105, 97, 108, 32, 76, 111, 99
\ 204C6F63
\ 0000000A 6B00 DC8 107, 0
534
Maximum stack usage in bytes:
Function .cstack
-------- -------
BSP_Ser_ISR_Handler 16
BSP_Ser_Init 40
BSP_Ser_Printf 112
BSP_Ser_RdByte 8
BSP_Ser_RdByteUnlocked 8
BSP_Ser_RdStr 32
BSP_Ser_WrByte 8
BSP_Ser_WrByteUnlocked 8
BSP_Ser_WrStr 16
Section sizes:
Function/Label Bytes
-------------- -----
BSP_SerTxWait 4
BSP_SerRxWait 4
BSP_SerLock 4
BSP_SerRxData 1
BSP_Ser_Init 292
BSP_Ser_ISR_Handler 90
BSP_Ser_Printf 40
BSP_Ser_RdByte 28
BSP_Ser_RdByteUnlocked 46
BSP_Ser_RdStr 190
BSP_Ser_WrByteUnlocked 50
BSP_Ser_WrByte 28
BSP_Ser_WrStr 70
??DataTable10 4
??DataTable10_1 4
??DataTable10_2 4
??DataTable10_3 4
??DataTable10_4 4
??DataTable10_5 4
??DataTable10_6 4
?<Constant "Serial Tx Wait"> 16
?<Constant "Serial Rx Wait"> 16
?<Constant "Serial Lock"> 12
13 bytes in section .bss
906 bytes in section .text
906 bytes of CODE memory
13 bytes of DATA memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -