Increase frequency precision in DMA

This commit is contained in:
F5OEO 2018-03-19 12:31:18 +00:00
parent 78c51aa372
commit 2925373382
4 changed files with 4 additions and 4 deletions

View file

@ -161,7 +161,7 @@ int clkgpio::SetFrequency(double Frequency)
}
uint32_t clkgpio::GetMasterFrac(int Frequency)
uint32_t clkgpio::GetMasterFrac(double Frequency)
{
if(ModulateFromMasterPLL)
{

View file

@ -163,7 +163,7 @@ class clkgpio:public gpio
int SetCenterFrequency(uint64_t Frequency,int Bandwidth);
int ComputeBestLO(uint64_t Frequency,int Bandwidth);
int SetMasterMultFrac(uint32_t Mult,uint32_t Frac);
uint32_t GetMasterFrac(int Frequency);
uint32_t GetMasterFrac(double Frequency);
void enableclk(int gpio);
void disableclk(int gpio);

View file

@ -106,7 +106,7 @@ void ngfmdmasync::SetDmaAlgo()
//fprintf(stderr,"Last cbp : src %x dest %x next %x\n",cbp->src,cbp->dst,cbp->next);
}
void ngfmdmasync::SetFrequencySample(uint32_t Index,int Frequency)
void ngfmdmasync::SetFrequencySample(uint32_t Index,double Frequency)
{
Index=Index%buffersize;
sampletab[Index]=(0x5A<<24)|GetMasterFrac(Frequency);

View file

@ -16,7 +16,7 @@ class ngfmdmasync:public bufferdma,public clkgpio,public pwmgpio,public pcmgpio
void SetDmaAlgo();
void SetPhase(bool inversed);
void SetFrequencySample(uint32_t Index,int Frequency);
void SetFrequencySample(uint32_t Index,double Frequency);
};
#endif