C51 COMPILER V9.59.0.0 STC8A_UART_ISR 06/10/2021 15:50:12 PAGE 1 C51 COMPILER V9.59.0.0, COMPILATION OF MODULE STC8A_UART_ISR OBJECT MODULE PLACED IN .\list\STC8A_UART_Isr.obj COMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE STC8A_UART_Isr.c OMF2 OPTIMIZE(8,SPEED) BROWSE DEBUG PRINT(.\list\STC8A_ -UART_Isr.lst) TABS(2) OBJECT(.\list\STC8A_UART_Isr.obj) line level source 1 /*---------------------------------------------------------------------*/ 2 /* --- STC MCU Limited ------------------------------------------------*/ 3 /* --- STC 1T Series MCU Demo Programme -------------------------------*/ 4 /* --- Mobile: (86)13922805190 ----------------------------------------*/ 5 /* --- Fax: 86-0513-55012956,55012947,55012969 ------------------------*/ 6 /* --- Tel: 86-0513-55012928,55012929,55012966 ------------------------*/ 7 /* --- Web: www.STCMCU.com --------------------------------------------*/ 8 /* --- Web: www.STCMCUDATA.com ---------------------------------------*/ 9 /* --- QQ: 800003751 -------------------------------------------------*/ 10 /* 如果要在程序中使用此代码,请在程序中注明使用了STC的资料及程序 */ 11 /*---------------------------------------------------------------------*/ 12 13 #include "STC8A_UART.h" 14 15 //======================================================================== 16 // 函数: UART1_ISR_Handler 17 // 描述: UART1中断函数. 18 // 参数: none. 19 // 返回: none. 20 // 版本: V1.0, 2020-09-23 21 //======================================================================== 22 #ifdef UART1 23 void UART1_ISR_Handler (void) interrupt UART1_VECTOR 24 { 25 1 if(RI) 26 1 { 27 2 RI = 0; 28 2 if(COM1.B_RX_OK == 0) 29 2 { 30 3 if(COM1.RX_Cnt >= COM_RX1_Lenth) COM1.RX_Cnt = 0; 31 3 RX1_Buffer[COM1.RX_Cnt++] = SBUF; 32 3 COM1.RX_TimeOut = TimeOutSet1; 33 3 } 34 2 } 35 1 36 1 if(TI) 37 1 { 38 2 TI = 0; 39 2 COM1.B_TX_busy = 0; 40 2 41 2 // if(COM1.TX_read != COM1.TX_write) 42 2 // { 43 2 // SBUF = TX1_Buffer[COM1.TX_read]; 44 2 // if(++COM1.TX_read >= COM_TX1_Lenth) COM1.TX_read = 0; 45 2 // } 46 2 // else COM1.B_TX_busy = 0; 47 2 } 48 1 } 49 #endif 50 51 //======================================================================== 52 // 函数: UART2_ISR_Handler 53 // 描述: UART2中断函数. 54 // 参数: none. C51 COMPILER V9.59.0.0 STC8A_UART_ISR 06/10/2021 15:50:12 PAGE 2 55 // 返回: none. 56 // 版本: V1.0, 2020-09-23 57 //======================================================================== 58 #ifdef UART2 void UART2_ISR_Handler (void) interrupt UART2_VECTOR { if(RI2) { CLR_RI2(); if(COM2.B_RX_OK == 0) { if(COM2.RX_Cnt >= COM_RX2_Lenth) COM2.RX_Cnt = 0; RX2_Buffer[COM2.RX_Cnt++] = S2BUF; COM2.RX_TimeOut = TimeOutSet2; } } if(TI2) { CLR_TI2(); COM2.B_TX_busy = 0; // if(COM2.TX_read != COM2.TX_write) // { // S2BUF = TX2_Buffer[COM2.TX_read]; // if(++COM2.TX_read >= COM_TX2_Lenth) COM2.TX_read = 0; // } // else COM2.B_TX_busy = 0; } } #endif 86 87 //======================================================================== 88 // 函数: UART3_ISR_Handler 89 // 描述: UART3中断函数. 90 // 参数: none. 91 // 返回: none. 92 // 版本: V1.0, 2020-09-23 93 //======================================================================== 94 #ifdef UART3 void UART3_ISR_Handler (void) interrupt UART3_VECTOR { if(RI3) { CLR_RI3(); if(COM3.B_RX_OK == 0) { if(COM3.RX_Cnt >= COM_RX3_Lenth) COM3.RX_Cnt = 0; RX3_Buffer[COM3.RX_Cnt++] = S3BUF; COM3.RX_TimeOut = TimeOutSet3; } } if(TI3) { CLR_TI3(); COM3.B_TX_busy = 0; // if(COM3.TX_read != COM3.TX_write) // { // S3BUF = TX3_Buffer[COM3.TX_read]; // if(++COM3.TX_read >= COM_TX3_Lenth) COM3.TX_read = 0; C51 COMPILER V9.59.0.0 STC8A_UART_ISR 06/10/2021 15:50:12 PAGE 3 // } // else COM3.B_TX_busy = 0; } } #endif 122 123 //======================================================================== 124 // 函数: UART4_ISR_Handler 125 // 描述: UART4中断函数. 126 // 参数: none. 127 // 返回: none. 128 // 版本: V1.0, 2020-09-23 129 //======================================================================== 130 #ifdef UART4 void UART4_ISR_Handler (void) interrupt UART4_VECTOR { if(RI4) { CLR_RI4(); if(COM4.B_RX_OK == 0) { if(COM4.RX_Cnt >= COM_RX4_Lenth) COM4.RX_Cnt = 0; RX4_Buffer[COM4.RX_Cnt++] = S4BUF; COM4.RX_TimeOut = TimeOutSet4; } } if(TI4) { CLR_TI4(); COM4.B_TX_busy = 0; // if(COM4.TX_read != COM4.TX_write) // { // S4BUF = TX4_Buffer[COM4.TX_read]; // if(++COM4.TX_read >= COM_TX4_Lenth) COM4.TX_read = 0; // } // else COM4.B_TX_busy = 0; } } #endif MODULE INFORMATION: STATIC OVERLAYABLE CODE SIZE = 78 ---- CONSTANT SIZE = ---- ---- XDATA SIZE = ---- ---- PDATA SIZE = ---- ---- DATA SIZE = ---- ---- IDATA SIZE = ---- ---- BIT SIZE = ---- ---- EDATA SIZE = ---- ---- HDATA SIZE = ---- ---- XDATA CONST SIZE = ---- ---- FAR CONST SIZE = ---- ---- END OF MODULE INFORMATION. C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)