/* Serial sends a char. 
This function will send a char to the UART */
static int serial_putc(struct rt_serial_device *serial, char c)
/* Serial sends a char. 
This function will send a char to the UART */
static int serial_putc(struct rt_serial_device *serial, char c)
{
    struct usart_async_descriptor* desc;
    RT_ASSERT(serial != RT_NULL);
    desc = (struct usart_async_descriptor *)serial->parent.user_data;
    RT_ASSERT(desc != RT_NULL);
    while (usart_async_is_tx_empty(desc) == 0);
    _usart_async_write_byte(&TARGET_IO.device, (uint8_t)c);
    return 1;
}