Ejemplo n.º 1
0
// Polls for a character on the serial port.
// Need to change
// Returns: Received character
//--------------------------------------------------------------       
void GetChar(void)
{ 
   //Poll for data
  //do
  //{
    // Nothing
  //} while(SCI0SR1_RDRF == 0);
  
 if(SCI0SR1_RDRF != 0){
 	if(SCI0DRL == 'x' || SCI0DRL == 'X'){
 		leftCommand = '\0';
 		(void)printf("\n\r>");
 	}
 	
 	else if(leftCommand == '\0'){
 		leftCommand = SCI0DRL;
 		TERMIO_PutChar(leftCommand);
 	}
 	
 	else if(SCI0DRL == '\r'){
 		DisableInterrupts;
 		processInput();
 		(void)printf("\r\n>");
 		EnableInterrupts;
 	}
 }
}
Ejemplo n.º 2
0
/*FUNCTION*-------------------------------------------------------------------
*
* Function Name    : WriteUARTN
* Returned Value   :
* Comments         :
*                    This function writes N bytes on the SCI1 console output
*
*END*----------------------------------------------------------------------*/
UARTError WriteUARTN(const void* bytes, unsigned long length) 
{
  int i;
  char* src = (char*)bytes;
  
  for(i = 0; i< length; i++) 
  {
   TERMIO_PutChar(*src++);
  }

 return kUARTNoError;  
}
Ejemplo n.º 3
0
void _ttywrch(int ch) {
	TERMIO_PutChar(ch);
}
Ejemplo n.º 4
0
int fputc(int ch, FILE *f) {
  TERMIO_PutChar(ch);
  return (ch);
}