#ifndef _USER_GEN_h
#define _USER_GEN_h

#include <stdint.h>
 

#define PRECISION_INCREASE 16
#define F_SAMPLE           68000


typedef enum {GEN_MODE_NORMAL, GEN_MODE_HALFSIN} GEN_MODE;


void GEN_Init(void);


void GEN_UmRegulationOn(bool regul);
void GEN_SearchForMax(uint8_t *inputData, uint8_t length);
void GEN_GetAmplitudeAndRegulate(void);
void GEN_SetAmplitudeUm(uint32_t ampliUm);

void GEN_Task(void);
void GEN_OrderJob(uint8_t total,uint16_t idx, uint32_t* src);
void GEN_Start(void);
void GEN_Stop(void);
void GEN_SetNewFrequency(uint32_t frequency);
void GEN_SetTestSourceData(uint16_t index, uint32_t frequency);
void GEN_SetNewScale(uint16_t scl);
void GEN_SetNewOffset(uint16_t ofs);
void GEN_SetMode(GEN_MODE mode);
//void GEN_CalculateNewSetTest(uint16_t idx, uint32_t frequency);

#endif