Skip to content

Commit

Permalink
Make option PWM use in ngfm
Browse files Browse the repository at this point in the history
  • Loading branch information
F5OEO committed Nov 9, 2018
1 parent 754322f commit 762af0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ngfmdmasync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/ngfmdmasync.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 762af0f

Please sign in to comment.