SmartOS/Device/DMA.h

31 lines
576 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __DMA_H__
#define __DMA_H__
// DMA
class DMA
{
private:
byte _index; // 第几个定时器从0开始
bool _started;
public:
DMA(byte index);
~DMA();
int Retry; // 等待重试次数默认200
int Error; // 错误次数
bool Start(); // 开始
bool WaitForStop(); // 停止
//typedef void (*TimerHandler)(Timer* tim, void* param);
//void Register(TimerHandler handler, void* param = nullptr);
private:
//static void OnHandler(ushort num, void* param);
//TimerHandler _Handler;
//void* _Param;
};
#endif