/*
 * ShmDataSyncExterns.h
 *
 *  Created on: Nov 11, 2025
 *      Author: tummalanr
 */

#ifndef SHMDATASYNCEXTERNS_H_
#define SHMDATASYNCEXTERNS_H_

#include <kernel/dpl/SemaphoreP.h>
#include "FreeRTOS.h"
#include "event_groups.h"
#include "queue.h"
#include "SharedMemoryGlobal.h"


/**
 * SPIN LOCK Number for IO Modules Cyclic Data Access.
 */
#define SPINLOCKNO_CYCLIC_IOMODULES                     (20u)
/**
 * SPIN LOCK Number for IO Modules ACyclic Data Access.
 */
#define SPINLOCKNO_ACYCLIC_IOMODULES                    (21u)
/**
 * SPIN LOCK Number for PZx Modules Cyclic Data Access.
 */
#define SPINLOCKNO_CYCLIC_PZx                           (22u)
/**
 * SPIN LOCK Number for PZx Modules ACyclic Data Access.
 */
#define SPINLOCKNO_ACYCLIC_PZx                          (23u)
/**
 * SPIN LOCK Number for System Info Access.
 */
#define SPINLOCKNO_SYSTEM_INFO                          (60u)


//SharedMemDataSynch.h
extern QueueHandle_t  io_shmdataupdwrqueue;


extern uint8_t     systemconfig_updated;
extern QueueHandle_t  pzx_shmdataupdwrqueue;

extern uint32_t            spinlockBaseAddr;
extern TaskHandle_t gSystemInfoTask;
extern SemaphoreP_Object   System_Info_mutexObj;



//SharedMemDataSynch.h
extern volatile    system_discoverystatusinfo      system_discovery_status;
//extern volatile    system_discoverystatusinfo      system_discovery_status __attribute__((aligned(1), section(".bss.user_shared_mem")));


//DataSynchInit.c
extern AppRET_T     DataSync_ProcessInit(void);
extern void APP_CyclicDataFetchTask(void* pArgs_p);

//DataSyncSysInfoTasks.c
extern void APP_SystemInfoTask(void* pArgs_p);



#endif /* SHMDATASYNCEXTERNS_H_ */
