📄 uart.lis
字号:
00F6 ; ptr -> R16,R17
.even
00F6 _SciBuffer_Tx_Out::
00F6 0E940000 xcall push_gset1
00FA .dbline -1
00FA .dbline 245
00FA ;
00FA ; //********************************************************************
00FA ; // Function : SciBuffer_Tx_Out
00FA ; // Input : ptr-pointer to SCI Buffer
00FA ; // Output : data from SCI TX Buffer
00FA ; // Description : Get data from the SCI TX Buffer
00FA ; //********************************************************************
00FA ; INT8U SciBuffer_Tx_Out(struct SCI_Buffer *ptr)
00FA ; {
00FA .dbline 247
00FA ; INT8U bData;
00FA ; bData = ptr->bTxBuffer[ptr->bTxLength];
00FA C801 movw R24,R16
00FC C596 adiw R24,53
00FE F801 movw R30,R16
0100 E181 ldd R30,z+1
0102 FF27 clr R31
0104 E80F add R30,R24
0106 F91F adc R31,R25
0108 4081 ldd R20,z+0
010A .dbline 248
010A ; ptr->bTxLength++;
010A C801 movw R24,R16
010C 0196 adiw R24,1
010E FC01 movw R30,R24
0110 8081 ldd R24,z+0
0112 8F5F subi R24,255 ; addi 1
0114 8083 std z+0,R24
0116 .dbline 249
0116 ; return(bData);
0116 042F mov R16,R20
0118 .dbline -2
0118 L26:
0118 0E940000 xcall pop_gset1
011C .dbline 0 ; func end
011C 0895 ret
011E .dbsym r bData 20 c
011E .dbsym r ptr 16 pX
011E .dbend
011E .dbfunc e SciBuffer_Tx_In _SciBuffer_Tx_In fV
011E ; bData -> R18
011E ; ptr -> R16,R17
.even
011E _SciBuffer_Tx_In::
011E .dbline -1
011E .dbline 259
011E .dbline 260
011E F801 movw R30,R16
0120 8281 ldd R24,z+2
0122 8436 cpi R24,100
0124 70F4 brsh L28
0126 .dbline 261
0126 .dbline 262
0126 C801 movw R24,R16
0128 C596 adiw R24,53
012A F801 movw R30,R16
012C E281 ldd R30,z+2
012E FF27 clr R31
0130 E80F add R30,R24
0132 F91F adc R31,R25
0134 2083 std z+0,R18
0136 .dbline 263
0136 C801 movw R24,R16
0138 0296 adiw R24,2
013A FC01 movw R30,R24
013C 8081 ldd R24,z+0
013E 8F5F subi R24,255 ; addi 1
0140 8083 std z+0,R24
0142 .dbline 264
0142 L28:
0142 .dbline -2
0142 .dbline 265
0142 ; }
0142 ;
0142 ; //********************************************************************
0142 ; // Function : SciBuffer_Tx_In
0142 ; // Input : ptr-pointer to SCI Buffer
0142 ; // Output : none
0142 ; // Description : Add data into the SCI TX Buffer
0142 ; //********************************************************************
0142 ; void SciBuffer_Tx_In(struct SCI_Buffer *ptr,INT8U bData)
0142 ; {
0142 ; if(ptr->bTxBufferLength < cMaxTxLength)
0142 ; {
0142 ; ptr->bTxBuffer[ptr->bTxBufferLength] = bData;
0142 ; ptr->bTxBufferLength++;
0142 ; }
0142 ; }
0142 L27:
0142 .dbline 0 ; func end
0142 0895 ret
0144 .dbsym r bData 18 c
0144 .dbsym r ptr 16 pX
0144 .dbend
0144 .dbfunc e sbGetTxBufferNoEmptyStatus _sbGetTxBufferNoEmptyStatus fc
0144 ; ptr -> R16,R17
.even
0144 _sbGetTxBufferNoEmptyStatus::
0144 .dbline -1
0144 .dbline 274
0144 ;
0144 ; //********************************************************************
0144 ; // Function : sbGetTxBufferNoEmptyStatus
0144 ; // Input : ptr-pointer to SCI Buffer
0144 ; // Output : Status of SCI TX Buffer
0144 ; // Description : Check whether the SCI TX Buffer is empty or not
0144 ; //********************************************************************
0144 ; INT8U sbGetTxBufferNoEmptyStatus(struct SCI_Buffer *ptr)
0144 ; {
0144 .dbline 275
0144 ; if(ptr->bTxLength < ptr->bTxBufferLength)
0144 F801 movw R30,R16
0146 2280 ldd R2,z+2
0148 F801 movw R30,R16
014A 3180 ldd R3,z+1
014C 3214 cp R3,R2
014E 10F4 brsh L31
0150 .dbline 276
0150 ; {
0150 .dbline 277
0150 ; return(true);
0150 01E0 ldi R16,1
0152 01C0 xjmp L30
0154 L31:
0154 .dbline 279
0154 ; }
0154 ; return(false);
0154 0027 clr R16
0156 .dbline -2
0156 L30:
0156 .dbline 0 ; func end
0156 0895 ret
0158 .dbsym r ptr 16 pX
0158 .dbend
0158 .dbfunc e sbGetTxBufferEmptyStatus _sbGetTxBufferEmptyStatus fc
0158 ; ptr -> R16,R17
.even
0158 _sbGetTxBufferEmptyStatus::
0158 .dbline -1
0158 .dbline 289
0158 ; }
0158 ;
0158 ; //********************************************************************
0158 ; // Function : sbGetTxBufferNoEmptyStatus
0158 ; // Input : ptr-pointer to SCI Buffer
0158 ; // Output : Status of SCI TX Buffer
0158 ; // Description : Check whether the SCI TX Buffer is empty or not
0158 ; //********************************************************************
0158 ; INT8U sbGetTxBufferEmptyStatus(struct SCI_Buffer *ptr)
0158 ; {
0158 .dbline 290
0158 ; if(ptr->bTxBufferLength == 0)
0158 F801 movw R30,R16
015A 2280 ldd R2,z+2
015C 2220 tst R2
015E 11F4 brne L34
0160 .dbline 291
0160 ; {
0160 .dbline 292
0160 ; return(true);
0160 01E0 ldi R16,1
0162 01C0 xjmp L33
0164 L34:
0164 .dbline 294
0164 ; }
0164 ; return(false);
0164 0027 clr R16
0166 .dbline -2
0166 L33:
0166 .dbline 0 ; func end
0166 0895 ret
0168 .dbsym r ptr 16 pX
0168 .dbend
0168 .dbfunc e sbGetRxBufferEmptyStatus _sbGetRxBufferEmptyStatus fc
0168 ; ptr -> R16,R17
.even
0168 _sbGetRxBufferEmptyStatus::
0168 .dbline -1
0168 .dbline 304
0168 ; }
0168 ;
0168 ; //********************************************************************
0168 ; // Function : sbGetRxBufferEmptyStatus
0168 ; // Input : ptr-pointer to SCI Buffer
0168 ; // Output : Status of SCI TX Buffer
0168 ; // Description : Check whether the SCI TX Buffer is empty or not
0168 ; //********************************************************************
0168 ; INT8U sbGetRxBufferEmptyStatus(struct SCI_Buffer *ptr)
0168 ; {
0168 .dbline 305
0168 ; if(ptr->bRxLength == 0)
0168 F801 movw R30,R16
016A 2080 ldd R2,z+0
016C 2220 tst R2
016E 11F4 brne L37
0170 .dbline 306
0170 ; {
0170 .dbline 307
0170 ; return(true);
0170 01E0 ldi R16,1
0172 01C0 xjmp L36
0174 L37:
0174 .dbline 309
0174 ; }
0174 ; return(false);
0174 0027 clr R16
0176 .dbline -2
0176 L36:
0176 .dbline 0 ; func end
0176 0895 ret
0178 .dbsym r ptr 16 pX
0178 .dbend
0178 .dbfunc e SciBuffer_Rx_Reset _SciBuffer_Rx_Reset fV
0178 ; ptr -> R16,R17
.even
0178 _SciBuffer_Rx_Reset::
0178 .dbline -1
0178 .dbline 319
0178 ; }
0178 ;
0178 ; //********************************************************************
0178 ; // Function : SciBuffer_Rx_Reset
0178 ; // Input : ptr-pointer to SCI Buffer
0178 ; // Output : none
0178 ; // Description : Reset RX Buffer Length to zero
0178 ; //********************************************************************
0178 ; void SciBuffer_Rx_Reset(struct SCI_Buffer *ptr)
0178 ; {
0178 .dbline 320
0178 ; ptr->bRxLength = 0;
0178 2224 clr R2
017A F801 movw R30,R16
017C 2082 std z+0,R2
017E .dbline -2
017E .dbline 321
017E ; }
017E L39:
017E .dbline 0 ; func end
017E 0895 ret
0180 .dbsym r ptr 16 pX
0180 .dbend
0180 .dbfunc e SciBuffer_Tx_Reset _SciBuffer_Tx_Reset fV
0180 ; ptr -> R16,R17
.even
0180 _SciBuffer_Tx_Reset::
0180 .dbline -1
0180 .dbline 330
0180 ;
0180 ; //********************************************************************
0180 ; // Function : SciBuffer_Tx_Reset
0180 ; // Input : ptr-pointer to SCI Buffer
0180 ; // Output : none
0180 ; // Description : Reset TX Buffer Length to zero
0180 ; //********************************************************************
0180 ; void SciBuffer_Tx_Reset(struct SCI_Buffer *ptr)
0180 ; {
0180 .dbline 331
0180 ; ptr->bTxLength = 0;
0180 2224 clr R2
0182 F801 movw R30,R16
0184 2182 std z+1,R2
0186 .dbline 332
0186 ; ptr->bTxBufferLength = 0;
0186 F801 movw R30,R16
0188 2282 std z+2,R2
018A .dbline -2
018A .dbline 333
018A ; }
018A L40:
018A .dbline 0 ; func end
018A 0895 ret
018C .dbsym r ptr 16 pX
018C .dbend
018C .dbfunc e SciBuffer_Tx_Inc _SciBuffer_Tx_Inc fV
018C ; ptr -> R16,R17
.even
018C _SciBuffer_Tx_Inc::
018C .dbline -1
018C .dbline 342
018C ;
018C ; //********************************************************************
018C ; // Function : SciBuffer_Tx_Inc
018C ; // Input : ptr-pointer to SCI Buffer
018C ; // Output : none
018C ; // Description : Increase TX Buffer Length
018C ; //********************************************************************
018C ; void SciBuffer_Tx_Inc(struct SCI_Buffer *ptr)
018C ; {
018C .dbline 343
018C ; ptr->bTxLength++;
018C C801 movw R24,R16
018E 0196 adiw R24,1
0190 FC01 movw R30,R24
0192 8081 ldd R24,z+0
0194 8F5F subi R24,255 ; addi 1
0196 8083 std z+0,R24
0198 .dbline -2
0198 .dbline 344
0198 ; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -