/*
 * global.c
 *
 *  Created on: 2024Äê5ÔÂ28ÈÕ
 *      Author: jinghang
 */

#include"global.h"
#include"sogi.h"
#define CLA1
uint32_t count=0;
uint32_t index=0;
uint16_t sinetable[125];
//lab 6
uint16_t adc1 = 0;
uint16_t adc2 = 0;

uint16_t plot[400];
uint16_t *adc =  &adc1;


//Sogi global variables

//SPLL_SOGI v_pll;
#pragma DATA_SECTION(vrede_CLA,"Cla1ToCpuMsgRAM");

#pragma DATA_SECTION(cla1_pll,"CLADataLS0");
#pragma DATA_SECTION(phase_CLA,"CLADataLS0");
#pragma DATA_SECTION(ampl_CLA,"CLADataLS0");
float vrede=0;
float vrede_CLA=0;
float vsync=0;
float phase=0;
float phase_CLA=0;
float ampl_CLA=0.5;
float ampl=0.5;
float plot1[400], plot2[400];
float*padc1=&vrede;
float*padc2=&vsync;

SPLL_SOGI v_pll;

#ifdef CLA1
SPLL_SOGI cla1_pll;
#endif
//trip
uint16_t tripevent=0;

uint32_t count_general=0;
uint32_t CMD_RESET_PWM=0;
