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

📄 serial.c

📁 51开发板调试程序
💻 C
字号:
#include<reg52.h>
#include <intrins.h>
#include "Define.h"
#include "Set.h"


extern  _ucdLEDDisplayArray[];
extern  _LengthOfLEDDisplayArray;

UCHARIDATA  ucidSERIALCounter = 0;

//////////////////////////////////////////////////////////////////
void  SerialPortCommunication(void)  reentrant  interrupt 4  using  3
{    

    if(TI)
	{
        TI=0;

		//if(ucidSERIALCounter < LengthOfLEDDisplayArray)
		{
            SBUF = ucdLEDDisplayArray[ucidSERIALCounter%LengthOfLEDDisplayArray];
			ucidSERIALCounter++;
		}
		//else
		{
		    ucidSERIALCounter = 0;
		}
        
		
    }
    if(RI)
	{
        RI=0;

			
		
		//RReceive();

		//ucdReceiveArray[] = SBUF;
        //t=inRxBuf;t++;
        //if(t==RxBuf+LenRxBuf) t=RxBuf;
        //if(t==outRxBuf) return;                 //RxBuf Full
        //*inRxBuf=SBUF;
        //inRxBuf=t;
    }
}
//////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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