Ejemplo n.º 1
0
//---------------------------------------------------------------------------
// Flush the rx and tx buffers
//
// 'portnum'  - number 0 to MAX_PORTNUM-1.  This number was provided to
//              OpenCOM to indicate the port number.
//
void FlushCOM(int portnum)
{
	if(portnum==0)
	   serial0_flush();
	else
	   serial1_flush();
}
Ejemplo n.º 2
0
//---------------------------------------------------------------------------
// Closes the connection to the port.
//
// 'portnum'  - number 0 to MAX_PORTNUM-1.  This number was provided to
//              OpenCOM to indicate the port number.
//
void CloseCOM(int portnum)
{
	if(portnum==0)
	{
	   ES0 = 0; //disable serial interrupt
	   serial0_flush();
	}
	else if(portnum==1)
	{
	   ES1 = 0; //disable serial interrup
	   serial1_flush();
	}
}
Ejemplo n.º 3
0
//---------------------------------------------------------------------------
// Flush the rx and tx buffers
//
// 'portnum'  - number 0 to MAX_PORTNUM-1.  This number was provided to
//              OpenCOM to indicate the port number.
//
void FlushCOM(int portnum)
{
   switch (port_handle[portnum])
   {
	  case DS400_SERIAL0:
       serial0_flush();
       break;
	  case DS400_SERIAL1:
	    serial1_flush();
       break;
	  case DS400_SERIAL2:
	    serial2_flush();
       break;
   }
}
Ejemplo n.º 4
0
void serial1_shutdown(void)
{
   ES1 = 0; //disable serial interrupt
   serial1_flush();
}