damaris-backends/drivers/DAC-AD5791/AD5791.h

49 lines
1.1 KiB
C
Raw Normal View History

2015-11-25 16:43:12 +00:00
/*
Markus Rosenstihl 2005 Nov
*/
#ifndef AD5791_H
#define AD5791_H
#include "core/states.h"
#include "drivers/pfggen.h"
/**
* \ingroup drivers
*/
class AD5791: public GenericDAC {
protected:
/// The channel for the latch signal
int latch_bit;
public:
int id;
// default constructor
AD5791(int myid=0);
virtual void set_dac(signed dw);
// virtual void set_dac_ttls(signed value);
void set_latch_bit(int le_bit);
/**
inserts necessary serial data transmission to set the dac, at the end of experiment reset the dac
assumes, the root sequence is not repeated, because the reset sequence is appended to the root sequence!
*/
virtual void set_dac(state& experiment);
// destructor
virtual ~AD5791();
private:
void set_dac_recursive(state_sequent& the_sequence, state::iterator& the_state);
void set_dac_to_zero(state_sequent* exp_sequence, state::iterator where);
void set_dac_control(state_sequent* exp_sequence, state::iterator where, int input_shift_register);
};
/*class pfg_exception: public std::string {
public:
pfg_exception(const std::string& s): std::string(s){}
};
*/
#endif