blob: 8a15c88679ec2d513bbf9bf14ae661f6eeabe193 [file] [log] [blame]
Harald Welte361ed202019-02-24 21:15:39 +01001/*
2 * Code generated from Atmel Start.
3 *
4 * This file will be overwritten when reconfiguring your Atmel Start project.
5 * Please copy examples or other code you want to keep to a separate file or main.c
6 * to avoid loosing it when reconfiguring.
7 */
8
9#include "atmel_start.h"
10#include "stdio_start.h"
11
Kévin Redon0c3533f2019-04-03 21:00:09 +020012static void UART_debug_rx_cb(const struct usart_async_rings_descriptor *const io_descr)
Harald Welte361ed202019-02-24 21:15:39 +010013{
Harald Welte361ed202019-02-24 21:15:39 +010014}
15
16void stdio_redirect_init(void)
17{
Kévin Redon0c3533f2019-04-03 21:00:09 +020018 usart_async_rings_register_callback(&UART_debug, USART_ASYNC_RXC_CB, UART_debug_rx_cb); // if no callback function is registered receive won't work, even if the callback does nothing
19 usart_async_rings_enable(&UART_debug);
Harald Welte361ed202019-02-24 21:15:39 +010020 stdio_io_init(&UART_debug.io);
21}