In avr-libc v1.2.x an fdevopen call worked this way:
fdevopen(usart_putc, usart_getc, 0);
Using USART function like this
int usart_putc(char data);
Now in avr-libc v1.4.0 the fdevopen function has been changed to:
FILE * fdevopen (int(*put)(char, FILE *), int(*get)(FILE *))
Which seems to require USART functions like this one:
int uart_putchar(char c, FILE *stream)
What is the reason for this change?
Why do we need an extra FILE pointer in USART functions?