//*****************************************************************************
//
//  DACdriver.h - Knihovna pro komunikaci a ovladani D/A prevodniku 
//
//*****************************************************************************

#ifndef __DAC_H__
#define __DAC_H__

//Definice konstant-------------------------------------------------------------
#define DAC_CHANNEL_A           0x0         // DAC output channel A
#define DAC_CHANNEL_B           0x1         // DAC output channel B
  
#define DAC_ACTIVE              0x1         // Output of DAC active
#define DAC_SHDN                0x0         // Output of DAC shutdown
#define DAC_GAIN_1              0x1         // Output gain selection = 1x
#define DAC_GAIN_2              0x0         // Output gain selection = 2x

//OLD DAC
#define DAC_WRITE               0x0         // Write to Input Register n 
#define DAC_UPDATE_REGISTER     0x1         // Update DAC Register n 
#define DAC_UPDATE_ALL          0x2         // Write to Input Register n, update all (software LDAC) 
#define DAC_UPDATE_CHANNEL      0x3         // Write to and update DAC Channel n  
#define DAC_POWER_ON_OFF        0x4         // Power down/power up DAC  
#define DAC_CLEAR               0x5         // Load clear code register 
#define DAC_LDAC                0x6         // Load LDAC register 
#define DAC_RESET               0x7         // Reset (power-on reset) 
#define DAC_DCEN                0x8         // Set up DCEN/REF register


// Deklarace funkci------------------------------------------------------------
extern void DACInit(void);
extern void DACSet(unsigned char channels,unsigned short value);
extern void DACReset();
extern void DACPower(unsigned char on_off, unsigned char channels);



#endif // __DAC_H__
