#ifdef __cplusplus | #ifdef __cplusplus | ||||
#define DMACHANNEL_HAS_BEGIN | #define DMACHANNEL_HAS_BEGIN | ||||
#define DMACHANNEL_HAS_BOOLEAN_CTOR | |||||
class DMABaseClass { | class DMABaseClass { | ||||
public: | public: | ||||
begin(); | begin(); | ||||
copy_tcd(TCD, c.TCD); | copy_tcd(TCD, c.TCD); | ||||
} | } | ||||
DMAChannel(bool allocate) { | |||||
if (allocate) begin(); | |||||
} | |||||
DMAChannel & operator = (const DMAChannel &rhs) { | DMAChannel & operator = (const DMAChannel &rhs) { | ||||
if (channel != rhs.channel) { | if (channel != rhs.channel) { | ||||
release(); | release(); |