Servus,
ich beschäftige mich mit dem Projekt Freemodbus
(http://freemodbus.berlios.de) für den AVR mit dem AVR Studio. Nach der
Kompilierung bekomme ich jede Menge Warnungen wie
\demo\AVR\port/port.h:114:1: warning: "UCSZ0" redefined
\demo\AVR\port/port.h:115:1: warning: "UCSZ1" redefined
\demo\AVR\port/port.h:116:1: warning: "UPM0" redefined
Der betroffene Code sieht wie folgt aus:
1 | /* ----------------------- AVR platform specifics ---------------------------*/
|
2 |
|
3 | #if defined (__AVR_ATmega168__)
|
4 | #define UCSRB UCSR0B
|
5 | #define TXEN TXEN0
|
6 | #define RXEN RXEN0
|
7 | #define RXCIE RXCIE0
|
8 | #define TXCIE TXCIE0
|
9 | #define UDRE UDRE0
|
10 | #define UBRR UBRR0
|
11 | #define UCSRC UCSR0C
|
12 | #define UPM1 UPM01
|
13 | #define UPM0 UPM00
|
14 | #define UCSZ0 UCSZ00
|
15 | #define UCSZ1 UCSZ01
|
16 | #define UDR UDR0
|
17 | #define SIG_UART_TRANS SIG_USART_TRANS
|
18 |
|
19 | #elif defined (__AVR_ATmega169__)
|
20 |
|
21 | #define SIG_UART_TRANS SIG_USART_TRANS
|
22 |
|
23 | #elif defined (__AVR_ATmega8__)
|
24 | #define UBRR UBRRL
|
25 | #define TCCR1C TCCR1A /* dummy */
|
26 | #define TIMSK1 TIMSK
|
27 | #define TIFR1 TIFR
|
28 | #define SIG_USART_DATA SIG_UART_DATA
|
29 | #define SIG_USART_RECV SIG_UART_RECV
|
30 |
|
31 | #elif defined (__AVR_ATmega16__)
|
32 | #define UBRR UBRRL
|
33 | #define TCCR1C TCCR1A /* dummy */
|
34 | #define TIMSK1 TIMSK
|
35 | #define TIFR1 TIFR
|
36 |
|
37 | #elif defined (__AVR_ATmega32__)
|
38 | #define UBRR UBRRL
|
39 | #define TCCR1C TCCR1A /* dummy */
|
40 | #define TIMSK1 TIMSK
|
41 | #define TIFR1 TIFR
|
42 |
|
43 | #elif defined (__AVR_ATmega128__)
|
44 | #define UCSRB UCSR0B
|
45 | #define UBRR UBRR0L
|
46 | #define UDR UDR0
|
47 | #define TIMSK1 TIMSK
|
48 | #define TIFR1 TIFR
|
49 | #define SIG_UART_TRANS SIG_USART0_TRANS
|
50 | #define SIG_USART_DATA SIG_USART0_DATA
|
51 | #define SIG_USART_RECV SIG_USART0_RECV
|
52 | #define UCSZ0 UCSZ00
|
53 | #define UCSZ1 UCSZ01
|
54 | #define UPM0 UPM00
|
55 | #define UPM1 UPM01
|
56 | #define UCSRC UCSR0C
|
57 |
|
58 | #endif
|
Können diese Warnungen irgendwie beseitigt werden? Übrigens finde ich
keine Zeile wie
im Sourcecode. Woher kriegt das Programm solche Defines?
MfG
Senmeis