/* Initialize the UART. 
This function initialize the UART */
int rt_hw_uart_init(void)
/* Initialize the UART. 
This function initialize the UART */
int rt_hw_uart_init(void)
{
    struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT;
    config.baud_rate = DEFAULT_USART_BAUD_RATE;
    sam_serial.ops       = &sam_serial_ops;
    sam_serial.config    = config;
    sam_serial.serial_rx = RT_NULL;
    sam_serial.serial_tx = RT_NULL;
    rt_hw_serial_register(&sam_serial, "uart0",
                          RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX |
                          RT_DEVICE_FLAG_INT_TX, (void *)&TARGET_IO);
    usart_async_register_callback(&TARGET_IO, USART_ASYNC_TXC_CB, serial_txcallback);
    usart_async_register_callback(&TARGET_IO, USART_ASYNC_RXC_CB, serial_rxcallback);
    return 0;
}