📄 tdmamanager.h
字号:
// Class for handling DMA transters.
// Copyright (c) National Instruments 2008. All Rights Reserved.
#ifndef __tDMAManager_h__
#define __tDMAManager_h__
#include "NiRio.h"
#include "tDMAChannelDescriptor.h"
#include "tSystem.h"
namespace nFPGA
{
class tDMAManager : public tSystem
{
public:
tDMAManager(tNIRIO_u32 dmaChannel, tNIRIO_u32 hostBufferSize, tRioStatusCode *status);
~tDMAManager();
void start(tRioStatusCode *status);
void stop(tRioStatusCode *status);
bool isStarted() {return _started;}
void read(
tNIRIO_u32* buf,
tNIRIO_u32 num,
tNIRIO_u32 timeout,
tNIRIO_u32* read,
tNIRIO_u32* remaining,
tRioStatusCode *status);
void write(
tNIRIO_u32* buf,
tNIRIO_u32 num,
tNIRIO_u32 timeout,
tNIRIO_u32* remaining,
tRioStatusCode *status);
private:
bool _started;
tNIRIO_u32 _dmaChannel;
tNIRIO_u32 _hostBufferSize;
tDMAChannelDescriptor const *_dmaChannelDescriptor;
};
}
#endif // __tDMAManager_h__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -