• Main Page
  • Classes
  • Files
  • File List
  • File Members

qeanalog.h

Go to the documentation of this file.
00001 //
00002 // begin license header
00003 //  
00004 // This file is part of Terk and TerkOS.
00005 //
00006 // All Terk and TerkOS source code is provided under the terms of the 
00007 // GNU General Public License v2 (http://www.gnu.org/licenses/gpl-2.0.html).  
00008 // Those wishing to use Terk and TerkOS source code, software and/or
00009 // technologies under different licensing terms should contact us at 
00010 // [email protected]. Such licensing terms are available for
00011 // all portions of the Terk and TerkOS codebase presented here.
00012 //
00013 // end license header
00014 //
00015 
00016 #ifndef _QEANALOG_H
00017 #define _QEANALOG_H
00018 
00019 #include "9302hw.h"
00020 #include "property.h"
00021 #include "singleton.h"
00022 
00023 #define QAD_AD_CHANNELS               25
00024 #define QAD_AD_ANALOG_IN_CHANNEL0_7   1
00025 #define QAD_AD_ANALOG_IN_CHANNEL8_15  2
00026 #define QAD_AD_ANALOG_IN_CHANNEL16_23 3
00027 #define QAD_AD_ANALOG_IN_CHANNEL24    0
00028 
00029 #define QAD_AD_SCALE                  16
00030 
00047 class CQEAnalog : public IProperty
00048   
00049 {
00050 public:
00054   SINGLETON(CQEAnalog);
00055   
00064   unsigned short GetADRaw(unsigned int channel);
00065 
00098   unsigned short GetADVoltage(unsigned int channel);
00099 
00100   // IProperty
00101   virtual int GetProperty(int property, long *value);
00102   virtual int SetProperty(int property, long value);
00103 
00104 private:
00105   CQEAnalog();
00106   ~CQEAnalog();
00107 
00108   C9302Hardware *m_p9302hw;
00109   unsigned short m_adcOffset;
00110 
00111   static const unsigned int m_num[25];
00112 };  
00113 
00114 
00115 #endif

Generated on Mon Oct 3 2011 15:36:31 for libqwerk by  doxygen 1.7.1