00001 #ifndef TLV_H 00002 #define TLV_H 00003 00004 #include "GNU_defs.h" 00005 00006 #define TLV_CONTROL PORTK 00007 #define TLV_CONFIG DDRK 00008 00009 #define LDAC 0x20 00010 #define DACS 0x10 00011 00012 #define TLVMAX 0xFFF 00013 00014 #define LDAC_OFF() TLV_CONTROL|=LDAC 00015 #define LDAC_ON() TLV_CONTROL&=(~LDAC) 00016 #define DACS_OFF() TLV_CONTROL|=DACS 00017 #define DACS_ON() TLV_CONTROL&=(~DACS) 00018 00019 #define TLV_INIT_LINES() {TLV_CONFIG|=(LDAC|DACS);LDAC_OFF();DACS_OFF();} 00020 00021 int __attribute__((far))TLV5614Init(void); 00022 void __attribute__((far))DAQcallback(u8 data, u8 **destptr); 00023 int __attribute__((far))TLV5614_Write(int channel, int value); 00024 int __attribute__((far))e12_Daq_Write(int channel, int value); 00025 00026 #endif