#include <Arduino.h>
#include "DDSModule.h"
#ifndef DDSDUALMODULE_H
#define DDSDUALMODULE_H
class DDSDualModule {
  public:
    DDSDualModule(int resetPin, int freqUpdatePin, int dataInPin, int clockPinA, int clockPinB);
    void SetFreq(long freqHz);    
    void SetASin();
    void SetACos();
    void SetBSin();
    void SetBCos();    
    void Start();
    void WriteControlBits();

  private:
    void PulseWriteClockA();
    void PulseWriteClockB();
    int PIN_RESET;
    int PIN_FREQUENCY_UPDATE;
    int PIN_DATA_IN;
    float OneHzPhaseWord;
    unsigned long _freq;
    DDSModule * _ddsA;
    DDSModule * _ddsB;    
    void SerialiseToPin(long bits, int numberOfBitsToSend, int clockPin);
    void FreqUpdatePulse();
    void ResetPulse();
    void InitDDS();
    
};
#endif
