Отправлено
dshabrov (84.21.231.242) 19 апреля 2010, г. 12:51
В ответ на: Ответ: отправлено
ВВ 19 апреля 2010, г. 11:07
For the ATxmega chips the getchar and putchar functions use by default the USARTC0. If you wish to use another USART, you must define the _ATXMEGA_USART_ preprocessor macro prior to #include the stdio.h header file, like in the example below:
/* use the ATxmega128A1 USARTD0 for getchar and putchar functions */ #define _ATXMEGA_USART_ USARTD0
/* use the Standard C I/O functions */ #include <stdio.h>
The _ATXMEGA_USART_ macro needs to be defined only once in the whole program, as the compiler will treat it like it is globally defined.
All the high level Input/Output functions use getchar and putchar.