SLS AVR Lib 0.1a
 
Loading...
Searching...
No Matches
uart_stdio.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------------+
2// This file is part of SLS AVR Library
3// https://github.com/SimonLitt/sls-avr-lib
4// ---------------------------------------------------------------------------+
5// Copyright (C) 2025 Simon Litt <simon@1itt.net> https://coding.1itt.net,
6// https://github.com/SimonLitt
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU General Public License as published by the Free
10// Software Foundation, version 3.
11//
12// This program is distributed in the hope that it will be useful, but WITHOUT
13// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15// more details.
16//
17// You should have received a copy of the GNU General Public License along
18// with this program. If not, see <https://www.gnu.org/licenses/>.
19// ---------------------------------------------------------------------------+
60
61#ifndef SLS_AVR_UART_STDIO_H_
62#define SLS_AVR_UART_STDIO_H_
63
64#include <stdio.h>
65#include <avr-uart/uart.h>
66
67#ifdef USART0_ENABLED || defined(__DOXYGEN__)
71
72# ifndef stdout_set_to_uart
73# define stdout_set_to_uart() stdout_set_to_uart0()
74# endif
75# ifndef stderr_set_to_uart
76# define stderr_set_to_uart() stderr_set_to_uart0()
77# endif
78# ifndef stdin_set_from_uart
79# define stdin_set_from_uart() stdin_set_from_uart0()
80# endif
81
82#endif // USART0_ENABLED
83
84#ifdef USART1_ENABLED || defined(__DOXYGEN__)
88#endif // USART1_ENABLED
89
90#ifdef USART2_ENABLED || defined(__DOXYGEN__)
94#endif // USART2_ENABLED
95
96#ifdef USART3_ENABLED || defined(__DOXYGEN__)
100#endif // USART3_ENABLED
101
102#endif /* SLS_AVR_UART_STDIO_H_ */
void stdin_set_from_uart3(void)
Sets standard input via USART3.
void stdout_set_to_uart0(void)
Sets standard output via USART0.
void stdout_set_to_uart2(void)
Sets standard output via USART2.
void stderr_set_to_uart3(void)
Sets standard error output via USART3.
void stdout_set_to_uart3(void)
Sets standard output via USART3.
void stdout_set_to_uart1(void)
Sets standard output via USART1.
void stdin_set_from_uart1(void)
Sets standard input via USART1.
void stderr_set_to_uart1(void)
Sets standard error output via USART1.
void stdin_set_from_uart0(void)
Sets standard input via USART0.
void stderr_set_to_uart2(void)
Sets standard error output via USART2.
void stdin_set_from_uart2(void)
Sets standard input via USART2.
void stderr_set_to_uart0(void)
Sets standard error output via USART0.