My current implementation looks like this:
void send_data(...) { ... while(TXE_bit != 1); /* Wait until TXE_bit becomes 1 */ ... }