lvmem.h

来自「相机传输图像程序源代码 拜耳模式(RAW格式文件)与RGB图像数据互相转换函数」· C头文件 代码 · 共 75 行

H
75
字号
#ifndef ___LVMEM_H
#define ___LVMEM_H

#include <pci.h>

#include <lvpackon.h>

class LvMem {

    private:

    protected:

        U32BIT Size;

        U8BIT _Huge_ *UserPtr;
        LVRAWPTR PhysicalAddress;
        LVRAWPTR LinearAddress;

        #ifndef __WIN3264__
        U16BIT LastBlock;
        U16BIT LastBlockSize;
        UINT   FirstSelector;
        BOOL   DPMISetSelectorLimit (UINT selector, DWORD dwLimit);
        void   FreeSelectorArray(void);
        LVSTATUS BuildSelectorArray(void);
        #endif

    public:

        LvMem(U32BIT aMemSize);
        ~LvMem(void);

        LVRAWPTR GetPhysicalAddress(void)    { return PhysicalAddress; }
        LVRAWPTR GetLinearAddress(void)      { return LinearAddress; }
        U8BIT _Huge_ *GetUserAddress(void) { return UserPtr; }
        U32BIT GetSize(void)               { return Size; }
    };


class LvPhysicalMem : public LvMem {
    private:
    protected:
        LVRAWPTR Phys2Lin(LVRAWPTR PhysicalAddress, U32BIT Size);
        LVSTATUS Initialize(LVRAWPTR Physical);
    public:
        LvPhysicalMem(LVRAWPTR Address, U32BIT Size);
        ~LvPhysicalMem();
    };

class LvLinearMem : public LvMem {
    private:
    protected:
        LVSTATUS Initialize(LVRAWPTR LinMemAddress);
    public:
        LvLinearMem(LVRAWPTR Address, U32BIT Size);
        ~LvLinearMem();
    };

class LvUserMem : public LvMem {
    private:
    protected:
        HANDLE hMem;
    public:
        LvUserMem(LVRAWPTR Address, U32BIT Size);
        ~LvUserMem();
    };


#include <lvpackof.h>

#endif


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?