Part Number: MSP430FR2633
Tool/software: Code Composer Studio
hello,
I working on captivate technology. There are some pre defined functions in captivate technology I am getting the error in code "unresolved symbol keypadSensor_Params, first referenced in ./main.obj". I have refered the code from "https://goo.gl/uUbe7n".
#include <msp430.h> // Generic MSP430 Device Include
#include "driverlib.h" // MSPWare Driver Library
#include "captivate.h" // CapTIvate Touch Software Library
#include "CAPT_App.h" // CapTIvate Application Code
#include "CAPT_BSP.h" // CapTIvate EVM Board Support Package
#include "CAPT_Type.h"
#define LED3_P1OUT (P1OUT)
#define LED3_P1DIR (P1DIR)
#define LED3_PIN (BIT0)
#define LED3_ON (LED3_P1OUT |= LED3_PIN)
#define LED3_OFF (LED3_P1OUT &= ~LED3_PIN)
#define LED3_TOGGLE (LED3_P1OUT ^= LED3_PIN)
#define LED4_P1OUT (P1OUT)
#define LED4_P1DIR (P1DIR)
#define LED4_PIN (BIT7)
#define LED4_ON (LED4_P1OUT |= LED4_PIN)
#define LED4_OFF (LED4_P1OUT &= ~LED4_PIN)
#define LED4_TOGGLE (LED4_P1OUT ^= LED4_PIN)
#define LED5_P1OUT (P1OUT)
#define LED5_P1DIR (P1DIR)
#define LED5_PIN (BIT6)
#define LED5_ON (LED5_P1OUT |= LED5_PIN)
#define LED5_OFF (LED5_P1OUT &= ~LED5_PIN)
#define LED5_TOGGLE (LED5_P1OUT ^= LED5_PIN)
#define keypadSensor BTN00
void updateLEDs(void);//(tSensor *sensor);//(void);
void my_button_callback(tSensor* pSensor);
extern tButtonSensorParams keypadSensor_Params;
void main(void)
{
//
// Initialize the MCU
// BSP_configureMCU() sets up the device IO and clocking
// The global interrupt enable is set to allow peripherals
// to wake the MCU.
//
WDTCTL = WDTPW | WDTHOLD;
BSP_configureMCU();
__bis_SR_register(GIE);
GPIO_setAsOutputPin(GPIO_PORT_P1,GPIO_PIN0|GPIO_PIN7|GPIO_PIN6);
MAP_CAPT_registerCallback(&BTN00, &my_button_callback);
//
// Start the CapTIvate application
//
CAPT_appStart();
//
// Background Loop
//
while(1)
{
CAPT_registerCallback(&BTN00, &my_button_callback);
__no_operation();
CAPT_appSleep();
} // End background loop
} // End main()
void updateLEDs(void)
{
if ((keypadSensor.bSensorTouch==true) && (keypadSensor.bSensorPrevTouch==false))
{
if (keypadSensor_Params.ui16DominantElement == 0x00)
{
LED1_OFF;
LED2_OFF;
}
else if (keypadSensor_Params.ui16DominantElement == 0x01)
{
LED1_ON;
LED2_OFF;
}
else if (keypadSensor_Params.ui16DominantElement == 0x02)
{
LED1_OFF;
LED2_ON;
}
else if (keypadSensor_Params.ui16DominantElement == 0x03)
{
LED1_ON;
LED2_ON;
}
else
{
LED1_OFF;
LED2_OFF;
}
}
else
{
LED1_OFF;
LED2_OFF;
}
}
void my_button_callback(tSensor* pSensor)
{
if((pSensor->bSensorTouch == true) && (pSensor->bSensorPrevTouch == false))
{
// BUTTON PRESSED
updateLEDs();//(0x00);
LED1_OFF;
LED3_OFF;
// DO SOMETHING ...
}
else if((pSensor->bSensorTouch == false) && (pSensor->bSensorPrevTouch == true))
{
// BUTTON RELEASED
LED1_OFF;
LED2_OFF;
LED3_ON;
// DO SOMETHING ...
}
}