/******************************************************************
 * @file  receiver_sync_first_func.h
 * @brief:    [file description] 
 * @author: HUOHUO
 * @Date 2024年4月20日
 * COPYRIGHT NOTICE: ITTC
 * Change_date         Owner         Change_content
 * 2024年4月20日        HUOHUO       create file
*****************************************************************/
#ifndef RECEIVER_SYNC_FIRST_FUNC_H
#define RECEIVER_SYNC_FIRST_FUNC_H
/****************************include*****************************/
#include "common.h"
#include "mem_def.h"
#include "phy_macro.h"
#include "receiver_sync_first_macro.h"
#include "receiver_sync_first_struct.h"
#include "ape_common.h"
#include "drv_ape.h"
#include "log_interface.h"
#include "msg_interface.h"
#include "osp_ape.h"
#include "task_define.h"
#include "trace.h"
#include "interface_rec_sync2_rec_sync_first.h"


//include mpu header files
#include "ByteCopy.h"
#include "SlidingCorrelation.h"
#include "SlidingCorrelationSecond.h"



//微码配置空间偏移结构体
extern receiver_sync_first_table_param_t  g_receiver_sync_first_table_param;
extern uint32_t *receiver_sync_first_config_dm0_ptr;
extern uint32_t *receiver_sync_first_config_dm1_ptr;
extern uint32_t *receiver_sync_first_config_dm2_ptr;
extern uint32_t *receiver_sync_first_config_dm3_ptr;

extern int32_t  *receiver_sync_first_malloc_dm0_ptr;
extern int32_t  *receiver_sync_first_malloc_dm1_ptr;
extern int32_t  *receiver_sync_first_malloc_dm2_ptr;
extern int32_t  *receiver_sync_first_malloc_dm3_ptr;
extern int32_t  *receiver_sync_first_temp_dm0_ptr;
extern int32_t  *receiver_sync_first_temp_dm1_ptr;
extern int32_t  *receiver_sync_first_temp_dm2_ptr;
extern int32_t  *receiver_sync_first_temp_dm3_ptr;

extern receiver_sync_status_t* g_receiver_sync_status_SM_ptr;
extern uint32_t sync2symb_data_buffer[4];
extern receiver_sync2symb_t data_send2symb_task[3];
extern uint16_t g_proc_id;

void Receiver_Sync_First_Init();
void Receiver_First_Sync_Proc(receiver_sync2first_sync_t* msg_ptr, uint32_t msg_len);

//debug
extern uint32_t* last_mem_dm[8];

#endif
