www.pudn.com > sci_A_B.rar   To Read all the content


[file head]:
//
// TMDX ALPHA RELEASE
// Intended for product evaluation purposes
//
//###########################################################################
//
// FILE: DSP28_Sci.c
//
// TITLE: DSP28 SCI Initialization &amt; Support Functions.
//
//###########################################################################
//
// Ver | dd mmm yyyy | Who | Description of changes
// =====|=============|======|===============================================
// 0.55| 06 May 2002 | L.H. | EzDSP Alpha Release
// 0.56| 20 May 2002 | L.H. | No change
// 0.57| 27 May 2002 | L.H. | No change
//###########################################################################

#include "DSP28_Device.h"

//---------------------------------------------------------------------------
// InitSPI:
//---------------------------------------------------------------------------
// This function initializes the SPI(s) to a known state.
//
void InitSci(void)
{
// Initialize SCI-A:

... ...

[file tail]:
... ...
/ Initialize SCI-B:

//tbd...
}

/********************************************************************************
name: int SciaTx_Ready(void)
input: none
output: i 1: ready
0: busy
*********************************************************************************/

int SciaTx_Ready(void)
{
unsigned int i;
if(ScibRegs.SCICTL2.bit.TXRDY == 1)
{
i = 1;
}
else
{
i = 0;
}
return(i);
}

/********************************************************************************
name: int SciaRx_Ready(void)
input: none
output: i 1: new data
0: none
*********************************************************************************/

int SciaRx_Ready(void)
{
unsigned int i;
if(ScibRegs.SCIRXST.bit.RXRDY == 1)
{
i = 1;
}
else
{
i = 0;
}
return(i);
}



//===========================================================================
// No more.
//===========================================================================