Hallo,
ich bin hier am verzweifeln... Ich finde einfach den Fehler nicht... =(
Bei folgendem Code:
kommt beim make all folgender Fehler:Code:#include "RP6ControlLib.h" #include "PCConnection.h" #include "RP6Control_I2CMasterLib.h" #include "RP6uart.h" #include "RP6I2CmasterTWI.h" #define I2C_SRF02_ADR_1 224; #define I2C_SRF02_ADR_2 226; int SRF02_Entfernung(void) { I2CTWI_transmit2Bytes(I2C_SRF02_ADR_1,0,81); uint8_t firmware; do { //I2CTWI_transmitByte(I2C_SRF02_ADR_1, 0); //firmware = I2CTWI_readByte(I2C_SRF02_ADR_1); mSleep(1); } while((firmware==255)); int entfernung; uint8_t lowByte; uint8_t highByte; return entfernung; } int main(void) { initRP6Control(); initLCD(); initRCConnection(); setStopwatch1(0); sound(180,80,25); sound(220,80,0); startStopwatch1(); while(true) { task_PCConnection(); if(getStopwatch1() >5000) { externalPort.LED1 = adcBat >600; externalPort.LED2 = adcBat >675; externalPort.LED3 = adcBat >750; externalPort.LED4 = adcBat >825; outputExt(); setStopwatch1(0); } int entfernung = SRF02_Entfernung(); } return 0; }
Nun habe ich leider überhaupt keine Ahnung woran das liegen könnte =(Code:I:\RP6\Programme\Eigene\RC-Steering>set LANG=C I:\RP6\Programme\Eigene\RC-Steering>make all -------- begin -------- avr-gcc (WinAVR 20100110) 4.3.3 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Size before: AVR Memory Usage ---------------- Device: atmega32 Program: 8032 bytes (24.5% Full) (.text + .data + .bootloader) Data: 363 bytes (17.7% Full) (.data + .bss + .noinit) Compiling: RCSteering.c avr-gcc -c -mmcu=atmega32 -I. -gdwarf-2 -Os -funsigned-char -funsigned-bitfiel ds -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=RCSteering. lst -II:/RP6/Library -II:/RP6/Library/RP6control -II:/RP6/Library/RP6common -std =gnu99 -MD -MP -MF .dep/RCSteering.o.d RCSteering.c -o RCSteering.o RCSteering.c: In function 'SRF02_Entfernung': RCSteering.c:12: error: expected ')' before ';' token RCSteering.c:12: error: too few arguments to function 'I2CTWI_transmit2Bytes' RCSteering.c:23: warning: unused variable 'highByte' RCSteering.c:22: warning: unused variable 'lowByte' RCSteering.c: In function 'main': RCSteering.c:31: warning: implicit declaration of function 'initRCConnection' RCSteering.c:51: warning: unused variable 'entfernung' make: *** [RCSteering.o] Error 1 I:\RP6\Programme\Eigene\RC-Steering>pause Drücken Sie eine beliebige Taste . . .
Kann mir bitte jemand helfen?
Fabi







Zitieren

Lesezeichen