Part Number: LAUNCHXL-CC2640R2
Hi,
I am porting the sensortag_cc2650lp_app from ble sdk 2.2 to cc2640r2 sdk. I am getting an error "Identifier syncEvent is undefined". The syncEvent variable can not be seen at sensortag_batt.c. I have followed the porting guide. What code changes do I need to make for syncEvent to be globally visible to all code files? Here are my changes.
sensortag_lp.c
// Semaphore globally used to post events to the application thread //ICall_Semaphore sem; ICall_SyncHandle syncEvent; //Add
sensortag_batt.c
/*********************************************************************
* INCLUDES
*/
#include <ti/sysbios/knl/Clock.h>
//#include <ti/sysbios/knl/Semaphore.h>
#include <ti/sysbios/knl/Event.h> //Add
#include <ti/sysbios/knl/Queue.h>
/*********************************************************************
* @fn SensorTagBatt_clockHandler
*
* @brief Handler function for clock time-outs.
*
* @param arg - event type
*
* @return none
*/
static void SensorTagBatt_clockHandler(UArg arg)
{
sensorReadScheduled = true;
// Wake up the application.
//Semaphore_post(sem); Remove
Event_post(syncEvent, arg); // Add
}
- kel