Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 Dear all i'm a newbie in psoc programming. I have spent a week in trying to run a code example found in the CSDADC documentation (page 45/55 of my datasheet) that i'll post here:

   

 

   

#include <m8c.h>        // part specific constants and macros

   

#include "PSoCAPI.h"    // PSoC API definitions for all User Modules

   

//#define ACD_KIND  CSDADC_RATIOMETRIC

   

#define ACD_KIND  CSDADC_ABSOLUTE

   

WORD wCal;

   

WORD wResult;

   

void main(void)

   

{

   

  M8C_EnableGInt;

   

  CSDADC_Start();

   

  CSDADC_SetDefaultFingerThresholds();  

   

  CSDADC_InitializeBaselines();  

   

  

   

#if (ACD_KIND==CSDADC_ABSOLUTE)

   

  CSDADC_EnableADC(ACD_KIND);

   

 wCal = CSDADC_wCal(1000);

   

#endif

   

while (1) {

   

    CSDADC_EnableCapsense();

   

CSDADC_ScanAllSensors();

   

    CSDADC_UpdateAllBaselines();

   

    CSDADC_EnableADC(ACD_KIND);

   

    CSDADC_EnableInput(0x01, 0x02); // use P2[0]

   

    CSDADC_StartADC();

   

    while (0 == CSDADC_fIsDataAvailable());

   

    wResult = CSDADC_wGetDataClearFlag(); 

   

    CSDADC_StopADC();

   

    CSDADC_DisableInput(0x01, 0x02); // required for normal CSD operation

   

}  

   

}

   

 

   

Everhing i do i get this error:

   

 

   

[warning]calling a function without prototype may cause runtime errors if the function does not return int or unsigned int

   

....

   

!ERROR {linker} file 'main.o': undefined symbol '_CSDADC_fIsDataAvailable'

   

 

   

It seems like if he doesn't see the libraries, i doesn't know what to do.

   
        
0 Likes
1 Reply
Anonymous
Not applicable

burningmosfet,

   

 

   

if you can repost the question on psoc 1 forum, you'll get better response.

   

this is psoc 5 forum

0 Likes