blob: 63e125d76371f03b5409b723d72d65acb99ed611 [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
Eric Wild22887032019-11-27 18:10:39 +010012#ifdef ENABLE_DBG_UART7
Kévin Redon0c3533f2019-04-03 21:00:09 +020013static void UART_debug_rx_cb(const struct usart_async_rings_descriptor *const io_descr)
Harald Welte361ed202019-02-24 21:15:39 +010014{
Harald Welte361ed202019-02-24 21:15:39 +010015}
16
17void stdio_redirect_init(void)
18{
Kévin Redon0c3533f2019-04-03 21:00:09 +020019 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
20 usart_async_rings_enable(&UART_debug);
Harald Welte361ed202019-02-24 21:15:39 +010021 stdio_io_init(&UART_debug.io);
22}
Eric Wild22887032019-11-27 18:10:39 +010023#endif