查询实现SCI接收2808

#include "DSP280x_Device.h"
#include "DSP280x_Examples.h"
void Init(void)
{
 InitSysCtrl();
 InitSciGpio();
 SciaRegs.SCICCR.bit.SCICHAR=7;
 SciaRegs.SCICCR.bit.STOPBITS=0;
 SciaRegs.SCIHBAUD=0x01;
 SciaRegs.SCILBAUD=0x44;
 SciaRegs.SCICTL1.bit.RXENA=1;
 SciaRegs.SCICTL1.bit.SWRESET=1;
}
void Init_Gpio(void)
{
 EALLOW;
 GpioCtrlRegs.GPAMUX1.all=0;
 GpioCtrlRegs.GPADIR.all=0xffff;
 EDIS;
}
void main(void)
{
 Init();
 Init_Gpio();
 while(1)
 {
  while(SciaRegs.SCIRXST.bit.RXRDY!=1);
   GpioDataRegs.GPADAT.all=SciaRegs.SCIRXBUF.all;
 }
}

转载于:https://www.cnblogs.com/luxiaolai/archive/2013/05/26/3100364.html

你可能感兴趣的:(查询实现SCI接收2808)