Browse Source

Add DMAChannel no initial allocation option

teensy4-core
PaulStoffregen 10 years ago
parent
commit
a522ef88b0
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      teensy3/DMAChannel.h

+ 4
- 0
teensy3/DMAChannel.h View File

#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();

Loading…
Cancel
Save