lib/PCI-3133.hh
00001 // PCI-3133蜈・蜃コ蜉帙け繝ゥ繧ケ
00002 // 2011/02/18 HIDETAKA MORIMITSU & Yuki YOKOKURA
00003 //
00004 // Interface遉セ陬スPCI-3133縺ョ縺溘a縺ョ蜈・蜃コ蜉帶ゥ溯�ス繧呈署萓帙@縺セ縺吶��
00005 // 1繝√Ε繝ウ繝阪Ν蝗コ螳壼、画鋤逕ィ
00006 //
00007 // Copyright (C) 2011 Yuki YOKOKURA
00008 // This program is free software;
00009 // you can redistribute it and/or modify it under the terms of the GNU General Public License
00010 // as published by the Free Software Foundation; either version 3 of the License, or any later version.
00011 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
00012 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00013 // See the GNU General Public License for more details <http://www.gnu.org/licenses/>.
00014 // Besides, you can negotiate about other options of licenses instead of GPL.
00015 // If you would like to get other licenses, please contact us<yuki@katsura.sd.keio.ac.jp>.
00016 
00017 #ifndef PCI3133
00018 #define PCI3133
00019 
00020 #include <sys/io.h>
00021 #include <unistd.h>
00022 
00023 namespace ARCS {        // ARCS蜷榊燕遨コ髢�
00024         class ADC3133 {
00025                 private:
00026                         unsigned int BaseAddr;                                                  // 蜈磯�ュ繧「繝峨Ξ繧ケ
00027                         void Settings(void);                                                    // A/D繧ウ繝ウ繝舌�シ繧ソ縺ョ險ュ螳壹r陦後≧髢「謨ー
00028                         unsigned short Input(void);                                             // A/D繧ウ繝ウ繝舌�シ繧ソ縺九i髮サ蝨ァ繝�繝シ繧ソ繧定ェュ縺ソ霎シ繧�髢「謨ー
00029                         double AdcDataToVolt(unsigned short ADCdata);   // 髮サ蝨ァ繝�繝シ繧ソ縺九i髮サ蝨ァ蛟、[V]縺ォ螟画鋤縺吶k髢「謨ー
00030                         unsigned long IIbyteCat(unsigned short High, unsigned short Low);
00031                         // 荳贋ス阪�∽ク倶ス阪↓蛻�縺九l縺ヲ縺�繧句推縲�1繝舌う繝医�ョ繝�繝シ繧ソ繧偵��2繝舌う繝医�ョ繝�繝シ繧ソ縺ォ邨仙粋縺吶k
00032         
00033                 public:
00034                         ADC3133(const unsigned int Base);               // 繧ウ繝ウ繧ケ繝医Λ繧ッ繧ソ(ADC蛻晄悄蛹厄シ�險ュ螳�)
00035                         ~ADC3133();                                                             // 繝�繧ケ繝医Λ繧ッ繧ソ(ADC邨ゆコ�蜃ヲ逅�)
00036                         volatile double GetVoltage(void);               // 髮サ蝨ァ蛟、[V]繧貞叙蠕�
00037         };
00038 }
00039 
00040 #endif
00041 
00042 
00043 
 All Classes Files