Final assignment for the course "Real Time and Embedded Systems" of THMMY in AUTH university.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
280 B

#include "Types.h"
#include "UsartPutChar.h"
#include "UsartTransmitBufferStatus.h"
#ifdef SIMULATE
#include <stdio.h>
#endif
void Usart_PutChar(char data)
{
while(!Usart_ReadyToTransmit());
#ifdef SIMULATE
printf("%c", data);
#else
AT91C_BASE_US0->US_THR = data;
#endif
}