那位熟练winavr? 用它来编译一个WinAVR + AVR Studio程序时, 出错,是不是没有包含串口的头文件?还是两者对寄存器的定义不同?
下边是错误: test.c:61: error: `UDR' undeclared (first use in this function) test.c:61: error: (Each undeclared identifier is reported only once test.c:61: error: for each function it appears in.) test.c:62: error: `UCSRA' undeclared (first use in this function) test.c:62: error: `TXC' undeclared (first use in this function) test.c: At top level: test.c:71: warning: function declaration isn't a prototype test.c: In function `main': test.c:79: error: `UBRRH' undeclared (first use in this function) test.c:79: error: `UBRRL' undeclared (first use in this function) test.c:79: error: `UCSRA' undeclared (first use in this function) test.c:79: error: `UCSRB' undeclared (first use in this function) test.c:79: error: `RXEN' undeclared (first use in this function) test.c:79: error: `TXEN' undeclared (first use in this function) test.c:79: error: `UCSRC' undeclared (first use in this function) test.c:79: error: `UCSZ1' undeclared (first use in this function) test.c:79: error: `UCSZ0' undeclared (first use in this function) test.c:108: error: `RXC' undeclared (first use in this function) test.c:110: error: `UDR' undeclared (first use in this function) make.exe: *** [obj/test.o] Error 1 |