fdhwlib
2.0.25
|
00001 /*************************************************************************** 00002 pbuspci.h - description 00003 00004 begin : Wed Jan 16 2008 00005 copyright : (C) 2008 by A Kopmann 00006 email : kopmann@ipe.fzk.de 00007 status : 00008 test : 00009 history : 00010 ***************************************************************************/ 00011 00012 #ifndef PBUSPCI_H 00013 #define PBUSPCI_H 00014 00015 #include "pbusimp.h" 00016 00017 // === Add this define in Pbus.h === 00018 #ifdef PBUS_PCI 00019 00020 00021 class semaphore; 00022 00023 00024 // === Add documentation for the access type === 00025 00041 class PbusPCI : public PbusImp 00042 { 00043 00044 public: 00045 PbusPCI(); 00046 00047 ~PbusPCI(); 00048 00049 const char *getMode(); 00050 00051 int getModeId(); 00052 00053 const char *getLibName(); 00054 00055 int get(std::string item, std::string *value); 00056 00057 int set(std::string item, std::string value); 00058 00059 int init(char *inifile, int host=0); 00060 00061 int free(int host=0); 00062 00063 void reset(); 00064 00065 unsigned long rawRead(unsigned long addr); 00066 00067 void rawWrite(unsigned long addr, unsigned long data); 00068 00070 void readBlock(unsigned long addr, unsigned long * data, 00071 unsigned long n, unsigned long incr=1); 00072 00073 void writeBlock(unsigned long addr, unsigned long * data, 00074 unsigned long n, unsigned long incr=1); 00075 00076 private: 00077 00078 // === Add private helper functions here === 00079 00080 private: 00081 // === Add private members here === 00082 static int handle; 00083 static int fd; 00084 static void* mp; 00085 static unsigned long ModuleID, Irq, BaseAddr, Size; 00086 00087 00088 }; 00089 00090 #endif // of PBUS_PCI 00091 00092 #endif // of PBUSPCI_H 00093 00094