Packages

Use Elixir to replay radio signals on a Raspberry Pi on GPIO 4

Current section

Files

Jump to
replex src librpitx-5475c41ccf202b544cac6cf0c670ae40210a9f4b src phasedmasync.h
Raw

src/librpitx-5475c41ccf202b544cac6cf0c670ae40210a9f4b/src/phasedmasync.h

#ifndef DEF_PHASEDMASYNC
#define DEF_PHASEDMASYNC
#include "stdint.h"
#include "dma.h"
#include "gpio.h"
class phasedmasync:public bufferdma,public clkgpio,public pwmgpio,public pcmgpio,public generalgpio
{
protected:
uint64_t tunefreq;
int NumbPhase=2;
uint32_t SampleRate;
uint32_t TabPhase[32];//32 is Max Phase
public:
phasedmasync(uint64_t TuneFrequency,uint32_t SampleRateIn,int NumberOfPhase,int Channel,uint32_t FifoSize);
~phasedmasync();
void SetDmaAlgo();
void SetPhase(uint32_t Index,int Phase);
void SetPhaseSamples(int *sample,size_t Size);
};
#endif