F5OEO-librpitx/src/iqdmasync.h

36 wiersze
964 B
C
Czysty Zwykły widok Historia

#ifndef DEF_IQDMASYNC
#define DEF_IQDMASYNC
#include "stdint.h"
#include "dma.h"
#include "gpio.h"
#include "dsp.h"
2018-11-01 00:36:40 +00:00
#define MODE_IQ 0
#define MODE_FREQ_A 1
class iqdmasync:public bufferdma,public clkgpio,public pwmgpio,public pcmgpio
{
2020-06-06 19:24:30 +00:00
public:
int ModeIQ=MODE_IQ; //patch (LU7DID-PEC): place ModeIQ as public so it can be changed from a calling program 3-May-2020
protected:
uint64_t tunefreq;
bool syncwithpwm;
dsp mydsp;
uint32_t Originfsel; //Save the original FSEL GPIO
2018-03-21 09:44:43 +00:00
uint32_t SampleRate;
public:
2020-07-23 11:35:53 +00:00
int ModeIQ=MODE_IQ;
2018-11-01 00:36:40 +00:00
iqdmasync(uint64_t TuneFrequency,uint32_t SR,int Channel,uint32_t FifoSize,int Mode);
~iqdmasync();
void SetDmaAlgo();
void SetPhase(bool inversed);
2018-03-22 22:48:49 +00:00
void SetIQSample(uint32_t Index,std::complex<float> sample,int Harmonic);
2018-11-01 00:36:40 +00:00
void SetFreqAmplitudeSample(uint32_t Index,std::complex<float> sample,int Harmonic);
2018-03-22 22:48:49 +00:00
void SetIQSamples(std::complex<float> *sample,size_t Size,int Harmonic);
};
#endif