#ifndef ADCDMA_H #define ADCDMA_H #include #include "oneway.h" #include "config.h" class AdcDma { static constexpr unsigned ADC_HALF_LEN = 1u << FFTORDER; static constexpr unsigned ADC_FULL_LEN = ADC_HALF_LEN * 2u; uint16_t * pL; uint16_t * pH; uint16_t buffer [ADC_FULL_LEN]; OneWay * dst; public: explicit AdcDma () noexcept; void attach (OneWay & d) { dst = & d; } void send (const bool b); protected: void Dma1Ch1Init (); }; #endif // ADCDMA_H