function identifier error using ADC on startKIT Topic is solved

If you have a simple question and just want an answer.
kellendenny
New User
Posts: 2
Joined: Thu Oct 16, 2014 2:40 pm

function identifier error using ADC on startKIT

Post by kellendenny »

When using this code in my own project (http://www.xcore.com/projects/adc-start ... munity-tab)

 

I get the error on 

 startkit_adc(c_adc);

in the main()

int main(void) {

    startkit_adc_if i_adc;                                     //For triggering/reading ADC
    chan c_adc;
    chan c;
    chan c2;
    par {
       adc_task(i_adc, c_adc, 0);           //Run ADC server task (on same core as GPIO!)
       startkit_adc(c_adc);                                     //Declare the ADC service (this is the ADC hardware, not a task)
       task1(c, c2, i_adc);
       pwm_handler(c, c2, qah, qal, qbh, qbl, qch, qcl, 1);
    }
    return 0;
}
 
The error message is "unknown function identifier `startkit_adc' (possibly missing prototype?)"
 
Any Ideas?
 
When I run the adc start kit example in its own freshly imported project I do not get this error. Only when I attempt to add the code to a project that I have been working on.
 
View Solution
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

You need to have startkit_adc service declared in your XN file. Check your XN file and see if this is the case. I have attached an XN file which you can add into your workspace. 

Note: remove .txt for the attached file.
You do not have the required permissions to view the files attached to this post.