Make option PWM use in ngfm
This commit is contained in:
parent
754322f642
commit
762af0f591
2 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ This program is free software: you can redistribute it and/or modify
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <time.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;
|
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::SetCenterFrequency(TuneFrequency,SampleRate); // Write Mult Int and Frac : FixMe carrier is already there
|
||||||
clkgpio::SetFrequency(0);
|
clkgpio::SetFrequency(0);
|
||||||
clkgpio::enableclk(4); // GPIO 4 CLK by default
|
clkgpio::enableclk(4); // GPIO 4 CLK by default
|
||||||
syncwithpwm=false;
|
syncwithpwm=UsePwm;
|
||||||
|
|
||||||
if(syncwithpwm)
|
if(syncwithpwm)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@ class ngfmdmasync:public bufferdma,public clkgpio,public pwmgpio,public pcmgpio
|
||||||
bool syncwithpwm;
|
bool syncwithpwm;
|
||||||
uint32_t SampleRate;
|
uint32_t SampleRate;
|
||||||
public:
|
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();
|
~ngfmdmasync();
|
||||||
void SetDmaAlgo();
|
void SetDmaAlgo();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue