/*
 * Main.h
 *
 *  Created on: 09-Jan-2024
 *      Author: 39138
 */

#ifndef MAIN_H_
#define MAIN_H_


#define BUFFERSIZE       350

#define PI_VALUE         3.1415926
#define PLL_SAMPLING     0.00004 //25kHz sampling
#define FREQUENCY_GRID           50.0
#define OMEGA                (2.0*PI_VALUE*FREQUENCY_GRID)
#define ADC_VALUE            4095
#define __cplusplus

//#define __TI_EABI__

typedef struct
{
    int16_t i16Present_Sample;
    int16_t i16Prev_Sample;
    int32_t i32Second_Sample;
    int32_t i32Third_Sample;
    int32_t i32Fouth_Sample;
    int32_t i32Fifth_Sample;
}STR_ADC_PARAM;
typedef struct
{
    int32_t i32Present_Sample;
    int32_t i32Prev_Sample;
    int32_t i32Second_Sample;
    int32_t i32Third_Sample;
    int32_t i32Fouth_Sample;
    int32_t i32Fifth_Sample;
}STR_ADC_PARAM_SUBTRACT;
typedef struct
{
    int32_t i32Present_Sample;
    int32_t i32Prev_Sample;
    int32_t i32Second_Sample;
    int32_t i32Third_Sample;
    int32_t i32Fouth_Sample;
    int32_t i32Fifth_Sample;
}STR_ADC_PARAM_FINAL;

typedef struct
{
    STR_ADC_PARAM strinput;
    STR_ADC_PARAM_SUBTRACT strCalibrate;
    STR_ADC_PARAM_FINAL strOutput;
}STR_CHECK;

void System_Initial(void);
__interrupt void Main_ISR(void);





#endif /* MAIN_H_ */
