www.pudn.com > Adsp21262forUart.rar > maindef.h


#define UART_RX_BUFFER_LEN 512 
 
/* FILE:maindef.h */ 
//////////////////////////////////////////////////////////// 
/*  Setup_UART( int DSP_Frequency, int BAUD ):*/ 
//float Setup_UART( float,float); 
	int Setup_UART(void); 
//////////////////////////////////////////////////////////// 
 
//////////////////////////////////////////////////////////// 
/* UartTX_Service():This function handles the TX interrupt  
   and moving data from the UART_Transmit_Buffer out to the 
   serial port. This function should be placed in the SPORT  
   1 ISR. */ 
//	void UartTX_Service(int sig_int); 
//////////////////////////////////////////////////////////// 
 
 
//////////////////////////////////////////////////////////// 
/*Uart_TX_Word(char): 
  Description: 
     This function writes a value to the SPORT1 transmit  
     register. It first takes the 8-bit value and creates  
     a 30-bit value for transmitting.  
 */ 
	void UartTX_Word(char); 
//////////////////////////////////////////////////////////// 
 
 
//////////////////////////////////////////////////////////// 
/*void UartTx_Buffer(char *buf,int buflenth); 
  Description: 
     This function writes a buffer of data to the SPORT1  
     transmit register. It first takes the 8-bit value  
     and creates an 11-bit value for transmitting. 
 */ 
	void UartTx_Buffer(char *,int ); 
//////////////////////////////////////////////////////////// 
 
 
//////////////////////////////////////////////////////////// 
/* Uart_Rx 
Description: 
   Once a SPORT3 receive interrupt occurs, this function  
   should be called (from C) to retrieve the and interpret 
   the value. This routine captures the input from RX3A, a 
   derives the 8-bit value. 
 */ 
	char UartRx(void); 
//////////////////////////////////////////////////////////// 
#if 0 
extern int _UART_Error; 
extern int UART_Transmit_Buffer[UART_TX_BUFFER_LEN]; 
extern int UART_Transmit_Buffer_Read_Ptr; 
extern int UART_Transmit_Buffer_Write_Ptr; 
#endif 
	char RX_Buffer[UART_RX_BUFFER_LEN]; 
	int Rx_Indx;