Make option PWM use in ngfm

This commit is contained in:
F5OEO 2018-11-09 09:34:56 +00:00
parent 754322f642
commit 762af0f591
2 changed files with 3 additions and 3 deletions

View file

@ -23,7 +23,7 @@ This program is free software: you can redistribute it and/or modify
#include <sched.h>
#include <time.h>
ngfmdmasync::ngfmdmasync(uint64_t TuneFrequency,uint32_t SR,int Channel,uint32_t FifoSize):bufferdma(Channel,FifoSize,2,1)
ngfmdmasync::ngfmdmasync(uint64_t TuneFrequency,uint32_t SR,int Channel,uint32_t FifoSize,bool UsePwm):bufferdma(Channel,FifoSize,2,1)
{
SampleRate=SR;
@ -32,7 +32,7 @@ ngfmdmasync::ngfmdmasync(uint64_t TuneFrequency,uint32_t SR,int Channel,uint32_t
clkgpio::SetCenterFrequency(TuneFrequency,SampleRate); // Write Mult Int and Frac : FixMe carrier is already there
clkgpio::SetFrequency(0);
clkgpio::enableclk(4); // GPIO 4 CLK by default
syncwithpwm=false;
syncwithpwm=UsePwm;
if(syncwithpwm)
{

View file

@ -12,7 +12,7 @@ class ngfmdmasync:public bufferdma,public clkgpio,public pwmgpio,public pcmgpio
bool syncwithpwm;
uint32_t SampleRate;
public:
ngfmdmasync(uint64_t TuneFrequency,uint32_t SR,int Channel,uint32_t FifoSize);
ngfmdmasync(uint64_t TuneFrequency,uint32_t SR,int Channel,uint32_t FifoSize,bool UsePwm=false);
~ngfmdmasync();
void SetDmaAlgo();