This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Wheel definition Problem on CCS (capacitive touch library)

Hello, I´m trying to define a wheel capacitive sensor. I previously checked a couple of examples  on slac490 zip file and I found the CapTouchBoosterPack_UserExperience example and it define the sensor as follow:

const struct Sensor wheel =
{
       //.halDefinition = fRO_PINOSC_TA0_SW,
         .halDefinition = RO_PINOSC_TA0_WDTp,
         .numElements = 4,
         .points = 64,
         .sensorThreshold = 75,
          .baseOffset = 0,
          // Pointer to elements
         .arrayPtr[0] = &volume_up, // point to first element
         .arrayPtr[1] = &right,
         .arrayPtr[2] = &volume_down,
         .arrayPtr[3] = &left,
          // Timer Information
         //.measGateSource= GATE_WDT_SMCLK, // 0->SMCLK, 1-> ACLK
         //.accumulationCycles= WDTp_GATE_32768 //32768
          .accumulationCycles= WDTp_GATE_8192 // 8192
         //.accumulationCycles= WDTp_GATE_512 //512
         //.accumulationCycles= WDTp_GATE_64 //64
         //.accumulationCycles = 32
};

Previously I made the characterization and works  well, but when I enable  ILLEGAL_SLIDER_WHEEL_POSITION and  WHEEL definitions in the file "structure.h" and add .points and .sensorThreshold variables, CCS  indicates the following compilation errors:

Have you any idea what may be happening?

Thanks for your time for read this question.

  • Juan,

    You may need to turn on GCC compatibility in the Properties menu. Project >  Properties > Build > Advanced Options > Language Options > Check Box "Enable support for GCC extensions (--gcc).

    Let me know if this helps.

    Thanks,
    Brian

  • Brian,

    I checked the project properties and the GCC compatibility  is enabled. To solve this problem I had to add the libraries from the example application  to a new blank project, even the "structure.c" and "structure.h" files, to make work my application  and being able to continue working in my project. I´m still wondering what was the problem, probably I made a mistake when I was trying to define the sensors.

    Thanks for your time.

    Juan.