PCIE之PCIEManager.h
来源:互联网 发布:乐乎城市青年社区租房 编辑:程序博客网 时间:2024/04/30 07:58
#ifndef PCIEMANAGER_H#define PCIEMANAGER_H#include "XilApi.h"#include <string>#include <memory>#include <QDebug>#include <time.h>#define COMMON_BUFFER_SIZE 0x40000class PCIEManager{public: static PCIEManager& GetInstance();//返回PCIEManager的引用 bool openBoard(std::string& errorInfo = std::string());//打开板卡 bool closeBoard();//关闭板卡 bool resetBoard(std::string& errorInfo = std::string());//复位板卡 bool isOpened() const;//板卡是否打开 int getDMABufLength()const;//获取板卡的DMA缓存大小 U64 getDmaUserAddr()const; bool read(void *pBuf, const int len);//从板卡读取数据到内存 bool write(void *pBuf, const int len);//从内存写数据到板卡 bool isReadyRead(); bool isReadyWrite();int isExistFrameHeader();//是否存在帧头U32 frameHeaderOffset();//帧头的偏移地址 U32 getDmaSendBitrate() const; U32 getDmaRecvBitrate() const; bool setDmaSendBitrate(U32 value); bool setDmaRecvBitrate(U32 value); //获取特定地址寄存器值 U32 PCIERegRead(U16 offset); XIL_STATUS PCIERegWrite(U16 offset,U32 ValueToWrite);private: PCIEManager(); struct PCIEManagerPrivate; //类内结构体需要这样声明吗****************************************** std::auto_ptr<PCIEManagerPrivate> pData;//auto_ptr就是动态分配对象以及在对象不再需要时执行自动清理 const U8 PCIE_READ_TLP_SIZE; const U8 PCIE_WRITE_TLP_SIZE;};#endif // PCIEMANAGER_H
0 0
- PCIE之PCIEManager.h
- PCIE之PCIEManager.cpp
- PCIE扫盲篇之PCIE接口定义
- PCIe 之TW68XX驱动
- PCIE之sth_util.cpp
- pcie
- pcie
- PCIE
- PCIE
- PCIE
- PCIe之DMA (一)
- PCIe之DMA (二)
- PCIe之DMA (三)
- COM载板设计之七:PCIe
- COM载板设计之七:PCIe
- C++类之PCIE驱动管理
- linux设备驱动之PCIE驱动开发
- Altera硬IP开发PCIe 之四 不只需要PCIe硬核
- spark作业调度
- 在.net中使用wcf做服务时,千万不要使用127.0.0.1作为Endpoint的address
- 利用iframe无刷新上传文件的坑
- C# 运算符重载
- 使用wait/notify实现生产者消费者模式
- PCIE之PCIEManager.h
- C++与C# 分别调用C++生成的DLL
- 解决git不能push静态库(.a文件)
- Lintcode34 N-Queens II solution 题解
- java入门--使用zxing生成二维码链接
- C++命名规则------文件
- 终端命令
- webpack入门篇
- 关于解决DockManager如何停靠在其他布局控件问题