/* check if write data to tx fifo is permitted.  */
int serial_writable(serial_t *obj)
/* check if write data to tx fifo is permitted.  */
int serial_writable(serial_t *obj)
{
	PMBED_UART_ADAPTER puart_adapter=&(uart_adapter[obj->uart_idx]);
	if (UART_Writable(puart_adapter->UARTx)) {
		return 1;
	} else {
		return 0;
	}
}