Hallo , ich versuche in Codeblock 10.5 mit dem avr-gcc 4.3.2 die RFM12lib (http://www.das-labor.org/wiki/RFM12_library) zu compilieren und bekomme bei folgender Zeile :
1 | //non-inlined version of rfm12_data
|
2 | //warning: without the attribute, gcc will inline this even if -Os is set
|
3 | //non-inlined version of rfm12_data
|
4 | //warning: without the attribute, gcc will inline this even if -Os is set
|
5 | void __attribute__ ((noinline)) rfm12_data(uint16_t d) |
6 | {
|
7 | SS_ASSERT(); |
8 | #if !(RFM12_SPI_SOFTWARE)
|
9 | SPDR = d>>8; |
10 | while(!(SPSR & (1<<SPIF))); |
11 | |
12 | SPDR = d & 0xff; |
13 | while(!(SPSR & (1<<SPIF))); |
14 | |
15 | #else
|
16 | spi_data(d >> 8 ); |
17 | spi_data(d & 0xff); |
18 | #endif
|
19 | SS_RELEASE(); |
20 | }
|
21 | |
22 | |
23 | //non-inlined version of rfm12_read
|
24 | //warning: without the attribute, gcc will inline this even if -Os is set
|
25 | uint16_t __attribute__ ((noinline)) rfm12_read(uint16_t c) |
26 | {
|
27 | uint16_t retval; |
28 | SS_ASSERT(); |
29 | |
30 | #if !(RFM12_SPI_SOFTWARE)
|
31 | SPDR = c>>8; |
32 | while(!(SPSR & (1<<SPIF))); |
33 | retval = SPDR<<8; |
34 | SPDR = c & 0xff; |
35 | while(!(SPSR & (1<<SPIF))); |
36 | retval |= SPDR; |
37 | |
38 | #else
|
39 | retval = spi_data(c >> 8 ); |
40 | retval <<= 8; |
41 | retval |= spi_data(c & 0xff); |
42 | #endif
|
43 | SS_RELEASE(); |
44 | return retval; |
45 | }
|
diesen Fehler : Zeile 59 und 79 sind jeweils die Function Header. Hat Jemand eine Idee ? Ich habe es natürlich auch schon ohne : _attribute_ ((noinline)) probiert ohne Erfolg. ..\Utils\RFM12lib\include\rfm12_spi.c|59|error: expected ')' before 'd'| ..\Utils\RFM12lib\include\rfm12_spi.c|79|warning: data definition has no type or storage class| ..\Utils\RFM12lib\include\rfm12_spi.c|79|warning: type defaults to 'int' in declaration of 'uint16_t'| ..\Utils\RFM12lib\include\rfm12_spi.c|79|warning: 'noinline' attribute ignored| ..\Utils\RFM12lib\include\rfm12_spi.c|79|error: expected ',' or ';' before 'rfm12_read'|