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

📄 serial.lst

📁 本代码已经经过修改
💻 LST
📖 第 1 页 / 共 3 页
字号:
   \   0000005C   301C               MOV         R0,R6
   \   0000005E   ........           _BLF        UART_FifoReset,UART_FifoReset??rT
    101          			UART_FifoReset( UART0, UART_TxFIFO );
   \   00000062   0121               MOV         R1,#+0x1
   \   00000064   301C               MOV         R0,R6
   \   00000066   ........           _BLF        UART_FifoReset,UART_FifoReset??rT
    102          			UART_LoopBackConfig(UART0, DISABLE );
   \   0000006A   0021               MOV         R1,#+0
   \   0000006C   301C               MOV         R0,R6
   \   0000006E   ........           _BLF        UART_LoopBackConfig,UART_LoopBackConfig??rT
    103          			UART_Config( UART0, ulWantedBaud, UART_NO_PARITY, UART_1_StopBits, UARTM_8D );
   \   00000072   0120               MOV         R0,#+0x1
   \   00000074   01B4               PUSH        {R0}
   \   00000076   0823               MOV         R3,#+0x8
   \   00000078   2122               MOV         R2,#+0x21
   \   0000007A   0199               LDR         R1,[SP, #+0x4]
   \   0000007C   301C               MOV         R0,R6
   \   0000007E   ........           _BLF        UART_Config,UART_Config??rT
    104          			UART_RxConfig( UART0, ENABLE );
   \   00000082   0121               MOV         R1,#+0x1
   \   00000084   301C               MOV         R0,R6
   \   00000086   ........           _BLF        UART_RxConfig,UART_RxConfig??rT
    105          
    106          			/* Configure the IEC for the UART interrupts. */
    107          			EIC_IRQChannelPriorityConfig( UART0_IRQChannel, 1 );
   \   0000008A   1149               LDR         R1,??xSerialPortInitMinimal_1+0x8  ;; 0xfffff884
   \   0000008C   0120               MOV         R0,#+0x1
   \   0000008E   0A68               LDR         R2,[R1, #+0]
   \   00000090   120C               LSR         R2,R2,#+0x10
   \   00000092   1204               LSL         R2,R2,#+0x10
   \   00000094   0243               ORR         R2,R0
   \   00000096   0A60               STR         R2,[R1, #+0]
    108          			EIC_IRQChannelConfig( UART0_IRQChannel, ENABLE );
   \   00000098   0E49               LDR         R1,??xSerialPortInitMinimal_1+0xC  ;; 0xfffff820
   \   0000009A   0A68               LDR         R2,[R1, #+0]
   \   0000009C   1543               ORR         R5,R2
   \   0000009E   0D60               STR         R5,[R1, #+0]
    109          			EIC_IRQConfig( ENABLE );
   \   000000A0   0D49               LDR         R1,??xSerialPortInitMinimal_1+0x10  ;; 0xfffff800
   \   000000A2   0A68               LDR         R2,[R1, #+0]
   \   000000A4   1043               ORR         R0,R2
   \   000000A6   0860               STR         R0,[R1, #+0]
    110          			UART_ItConfig( UART0, UART_RxBufFull, ENABLE );
   \   000000A8   0122               MOV         R2,#+0x1
   \   000000AA   0121               MOV         R1,#+0x1
   \   000000AC   301C               MOV         R0,R6
   \   000000AE   ........           _BLF        UART_ItConfig,UART_ItConfig??rT
    111          		}
    112          		portEXIT_CRITICAL();
   \   000000B2   ........           _BLF        vPortExitCritical,vPortExitCritical??rT
   \   000000B6   01B0               ADD         SP,#+0x4
   \   000000B8   00E0               B           ??xSerialPortInitMinimal_2
    113          	}
    114          	else
    115          	{
    116          		xReturn = ( xComPortHandle ) 0;
   \                     ??xSerialPortInitMinimal_0:
   \   000000BA   0024               MOV         R4,#+0
    117          	}
    118          
    119          	/* This demo file only supports a single port but we have to return
    120          	something to comply with the standard demo header file. */
    121          	return xReturn;
   \                     ??xSerialPortInitMinimal_2:
   \   000000BC   201C               MOV         R0,R4
   \   000000BE   01B0               ADD         SP,#+0x4
   \   000000C0   F0BC               POP         {R4-R7}
   \   000000C2   02BC               POP         {R1}
   \   000000C4   0847               BX          R1                 ;; return
   \   000000C6   C046               NOP         
   \                     ??xSerialPortInitMinimal_1:
   \   000000C8   003000E0           DC32        0xe0003000
   \   000000CC   004000C0           DC32        0xc0004000
   \   000000D0   84F8FFFF           DC32        0xfffff884
   \   000000D4   20F8FFFF           DC32        0xfffff820
   \   000000D8   00F8FFFF           DC32        0xfffff800
    122          }
    123          /*-----------------------------------------------------------*/
    124          

   \                                 In segment CODE, align 4, keep-with-next
    125          signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
    126          {
   \                     xSerialGetChar:
   \   00000000   00B5               PUSH        {LR}
    127          	/* The port handle is not required as this driver only supports one port. */
    128          	( void ) pxPort;
    129          
    130          	/* Get the next character from the buffer.  Return false if no characters
    131          	are available, or arrive before xBlockTime expires. */
    132          	if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
   \   00000002   ....               LDR         R0,??DataTable8    ;; ??xRxedChars
   \   00000004   0068               LDR         R0,[R0, #+0]
   \   00000006   ........           _BLF        xQueueReceive,xQueueReceive??rT
   \   0000000A   401E               SUB         R0,R0,#+0x1
   \   0000000C   8041               SBC         R0,R0
   \   0000000E   C043               MVN         R0,R0
   \   00000010   C00F               LSR         R0,R0,#+0x1F
    133          	{
    134          		return pdTRUE;
    135          	}
    136          	else
    137          	{
    138          		return pdFALSE;
   \   00000012   02BC               POP         {R1}
   \   00000014   0847               BX          R1                 ;; return
    139          	}
    140          }
    141          /*-----------------------------------------------------------*/
    142          

   \                                 In segment CODE, align 4, keep-with-next
    143          void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
    144          {
   \                     vSerialPutString:
   \   00000000   10B5               PUSH        {R4,LR}
   \   00000002   81B0               SUB         SP,#+0x4
   \   00000004   0C1C               MOV         R4,R1
    145          signed portCHAR *pxNext;
    146          
    147          	/* A couple of parameters that this port does not use. */
    148          	( void ) usStringLength;
    149          	( void ) pxPort;
    150          
    151          	/* NOTE: This implementation does not handle the queue being full as no
    152          	block time is used! */
    153          
    154          	/* The port handle is not required as this driver only supports UART0. */
    155          	( void ) pxPort;
    156          
    157          	/* Send each character in the string, one at a time. */
    158          	pxNext = ( signed portCHAR * ) pcString;
   \   00000006   0EE0               B           ??vSerialPutString_0
    159          	while( *pxNext )
    160          	{
    161          		xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
   \                     ??vSerialPutString_1:
   \   00000008   6946               MOV         R1,SP
   \   0000000A   0870               STRB        R0,[R1, #+0]
   \   0000000C   0022               MOV         R2,#+0
   \   0000000E   ....               LDR         R0,??DataTable7    ;; ??xCharsForTx
   \   00000010   0068               LDR         R0,[R0, #+0]
   \   00000012   ........           _BLF        xQueueSend,xQueueSend??rT
   \   00000016   0128               CMP         R0,#+0x1
   \   00000018   04D1               BNE         ??vSerialPutString_2
   \   0000001A   ....               LDR         R0,??DataTable6    ;; 0xc0004010
   \   0000001C   0188               LDRH        R1,[R0, #+0]
   \   0000001E   0422               MOV         R2,#+0x4
   \   00000020   0A43               ORR         R2,R1
   \   00000022   0280               STRH        R2,[R0, #+0]
    162          		pxNext++;
   \                     ??vSerialPutString_2:
   \   00000024   641C               ADD         R4,R4,#+0x1
    163          	}
   \                     ??vSerialPutString_0:
   \   00000026   0020               MOV         R0,#+0
   \   00000028   2056               LDRSB       R0,[R4, R0]
   \   0000002A   0028               CMP         R0,#+0
   \   0000002C   ECD1               BNE         ??vSerialPutString_1
    164          }
   \   0000002E   01B0               ADD         SP,#+0x4
   \   00000030   10BC               POP         {R4}
   \   00000032   01BC               POP         {R0}
   \   00000034   0047               BX          R0                 ;; return
    165          /*-----------------------------------------------------------*/
    166          

   \                                 In segment CODE, align 4, keep-with-next
    167          signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
    168          {
   \                     xSerialPutChar:
   \   00000000   02B5               PUSH        {R1,LR}
    169          	/* Place the character in the queue of characters to be transmitted. */
    170          	if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
   \   00000002   6946               MOV         R1,SP
   \   00000004   ....               LDR         R0,??DataTable7    ;; ??xCharsForTx
   \   00000006   0068               LDR         R0,[R0, #+0]
   \   00000008   ........           _BLF        xQueueSend,xQueueSend??rT
   \   0000000C   0128               CMP         R0,#+0x1
   \   0000000E   01D0               BEQ         ??xSerialPutChar_0
    171          	{
    172          		return pdFAIL;
   \   00000010   0020               MOV         R0,#+0
   \   00000012   05E0               B           ??xSerialPutChar_1
    173          	}
    174          
    175          	/* Turn on the Tx interrupt so the ISR will remove the character from the
    176          	queue and send it.   This does not need to be in a critical section as
    177          	if the interrupt has already removed the character the next interrupt
    178          	will simply turn off the Tx interrupt again. */
    179          	serINTERRUPT_ON();
   \                     ??xSerialPutChar_0:
   \   00000014   ....               LDR         R0,??DataTable6    ;; 0xc0004010
   \   00000016   0188               LDRH        R1,[R0, #+0]

⌨️ 快捷键说明

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