WarChild
17.04.2008, 17:58
Ich möchte mein RP6 Control Board als Slave betreiben.
aber ich bekomme immer eine Fehlermeldungen dieser Art:
C:\...\Informatik\RP6\RP6CONTROL_EXAMPLES\!I2C_Sla ve/I2C_Slave.c:14: undefined reference to `I2CTWI_writeBusy'
...I2C_Slave.c:14: undefined reference to `I2CTWI_writeRegisters'
...I2C_Slave.c:112: undefined reference to `I2CTWI_initSlave'
// Includes:
#include "RP6ControlLib.h" // The RP6 Control Library.
// Always needs to be included!
#include "RP6I2CslaveTWI.h"
#define I2C_RP6_Control_ADR 0x0A
/************************************************** ***************************/
void LCD_data(void)
{
if(!I2CTWI_writeBusy && I2CTWI_writeRegisters[1])
{
uint16_t adcLSL = I2CTWI_writeRegisters[1]*256+I2CTWI_writeRegisters[2];
uint16_t adcLSR = I2CTWI_writeRegisters[3]*256+I2CTWI_writeRegisters[4];
uint16_t adcMotorCurrentLeft = I2CTWI_writeRegisters[5]*256+I2CTWI_writeRegisters[6];
uint16_t adcMotorCurrentRight = I2CTWI_writeRegisters[7]*256+I2CTWI_writeRegisters[8];
uint16_t adcBat = I2CTWI_writeRegisters[9]*256+I2CTWI_writeRegisters[10];
uint16_t temperature = I2CTWI_writeRegisters[11]*256+I2CTWI_writeRegisters[12];
uint16_t distance = I2CTWI_writeRegisters[13]*256+I2CTWI_writeRegisters[14];
uint16_t direction = I2CTWI_writeRegisters[15]*256+I2CTWI_writeRegisters[16];
I2CTWI_writeRegisters[1] = 0;
...
da kann doch nur irgendein Fehler mit #include "RP6I2CslaveTWI.h" sein
mfg WarChild
aber ich bekomme immer eine Fehlermeldungen dieser Art:
C:\...\Informatik\RP6\RP6CONTROL_EXAMPLES\!I2C_Sla ve/I2C_Slave.c:14: undefined reference to `I2CTWI_writeBusy'
...I2C_Slave.c:14: undefined reference to `I2CTWI_writeRegisters'
...I2C_Slave.c:112: undefined reference to `I2CTWI_initSlave'
// Includes:
#include "RP6ControlLib.h" // The RP6 Control Library.
// Always needs to be included!
#include "RP6I2CslaveTWI.h"
#define I2C_RP6_Control_ADR 0x0A
/************************************************** ***************************/
void LCD_data(void)
{
if(!I2CTWI_writeBusy && I2CTWI_writeRegisters[1])
{
uint16_t adcLSL = I2CTWI_writeRegisters[1]*256+I2CTWI_writeRegisters[2];
uint16_t adcLSR = I2CTWI_writeRegisters[3]*256+I2CTWI_writeRegisters[4];
uint16_t adcMotorCurrentLeft = I2CTWI_writeRegisters[5]*256+I2CTWI_writeRegisters[6];
uint16_t adcMotorCurrentRight = I2CTWI_writeRegisters[7]*256+I2CTWI_writeRegisters[8];
uint16_t adcBat = I2CTWI_writeRegisters[9]*256+I2CTWI_writeRegisters[10];
uint16_t temperature = I2CTWI_writeRegisters[11]*256+I2CTWI_writeRegisters[12];
uint16_t distance = I2CTWI_writeRegisters[13]*256+I2CTWI_writeRegisters[14];
uint16_t direction = I2CTWI_writeRegisters[15]*256+I2CTWI_writeRegisters[16];
I2CTWI_writeRegisters[1] = 0;
...
da kann doch nur irgendein Fehler mit #include "RP6I2CslaveTWI.h" sein
mfg WarChild