Hello,
I want do return a struct as suggestet in the last post in this article:
But including the line "MeasuredCurrents = getStrom();"
gives me an error: "INTERNAL ERROR: no match for CALL"
I am using CCS Version: 6.1.0.00104 with the SRV8301-LS31-Kit
typedef struct Strom{ float PhaseU; float PhaseV; float PhaseW; }Strom_t; typedef struct adcData { uint32 id; /**< Channel/Pin Id */ uint16 value; /**< Conversion data value */ } adcData_t; --my function
Strom_t getStrom(void) { adcData_t ADCResults[3]; //make an array of type adcData_t Strom_t CurrentResults; adcGetData(adcREG1, adcGROUP1, ADCResults); //write conversion results into Array CurrentResults.PhaseU =( ( (float)ADCResults[0].value * 3.3) + 0.5 ) / 4096; // calculate currents CurrentResults.PhaseV =( ( (float)ADCResults[1].value * 3.3) + 0.5 ) / 4096; CurrentResults.PhaseW =( ( (float)ADCResults[2].value * 3.3) + 0.5 ) / 4096; return CurrentResults; } -- in an RTI i have this code Strom_t MeasuredCurrents; MeasuredCurrents = getStrom(); //including this line i get an error