Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef _MEMMAP_H
00017 #define _MEMMAP_H
00018
00025 class CMemMap
00026 {
00027 public:
00033 CMemMap(unsigned int base, unsigned int size);
00034 ~CMemMap();
00035
00039 unsigned long GetMap()
00040 {
00041 return (unsigned long)m_map;
00042 }
00043
00049 inline volatile unsigned int *Uint(unsigned int offset=0)
00050 {
00051 return (volatile unsigned int *)(m_map + offset);
00052 }
00053
00059 inline volatile unsigned short *Ushort(unsigned int offset=0)
00060 {
00061 return (volatile unsigned short *)(m_map + offset);
00062 }
00063
00069 inline volatile unsigned char *Uchar(unsigned int offset=0)
00070 {
00071 return (volatile unsigned char *)(m_map + offset);
00072 }
00073 private:
00074 int m_fd;
00075 unsigned char *m_map;
00076 };
00077
00078 #endif