Esempio n. 1
0
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// void uart_send_wait_for_complete(uint8_t tx_data)
//
// Description:
//  Sends a byte over the UART and waits for it to complete
//
// Parameters:
//  uint8_t tx_data - byte to send over the UART
//
// Return value:
//  None
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void uart_send_wait_for_complete(uint8_t tx_data)
{
	uart_send(tx_data);

	while(!uart_tx_data_sent());

	interrupt_clear_uart_tx();
}
Esempio n. 2
0
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// void putchar(char c)
//
// Description:
//  Allows use of stdio printf to output to uart
//
// Parameters:
//  char c - char to send over the UART
//
// Return value:
//  None
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void putchar(char c)
{
	interrupt_wait_for_uart_tx();

	interrupt_clear_uart_tx();

   	uart_send(c);
}