This repository has been archived on 2020-09-21. You can view files and clone it, but cannot push or open issues or pull requests.
FRC2016-old/Robot2016/wpilib/cpp/current/include/FRC_FPGA_ChipObject/tDMAManager.h
Jason 6d0e75aa64 Added new Robot project using PWM drive train... Much simpler...
Signed-off-by: Jason <jason@dublinschool.org>
2016-02-09 16:23:45 -05:00

42 lines
919 B
C++

// Class for handling DMA transfers.
// Copyright (c) National Instruments 2008. All Rights Reserved.
#ifndef __tDMAManager_h__
#define __tDMAManager_h__
#include "tSystem.h"
#include <stdint.h>
namespace nFPGA
{
class tDMAManager : public tSystem
{
public:
tDMAManager(uint32_t dmaChannel, uint32_t hostBufferSize, tRioStatusCode *status);
~tDMAManager();
void start(tRioStatusCode *status);
void stop(tRioStatusCode *status);
bool isStarted() {return _started;}
void read(
uint32_t* buf,
size_t num,
uint32_t timeout,
size_t* remaining,
tRioStatusCode *status);
void write(
uint32_t* buf,
size_t num,
uint32_t timeout,
size_t* remaining,
tRioStatusCode *status);
private:
bool _started;
uint32_t _dmaChannel;
uint32_t _hostBufferSize;
};
}
#endif // __tDMAManager_h__