RISC-V/V203/usb/common/adcdma.h

22 lines
408 B
C
Raw Normal View History

2024-10-19 14:58:36 +02:00
#ifndef ADCDMA_H
#define ADCDMA_H
#include <stdint.h>
class OneWay;
static constexpr unsigned HALF_LEN = 20u;
static constexpr unsigned FULL_LEN = HALF_LEN * 2u;
class AdcDma {
uint16_t * pL;
uint16_t * pH;
uint16_t buffer [FULL_LEN];
OneWay * dst;
public:
explicit AdcDma () noexcept;
void attach (OneWay & d) { dst = & d; }
void send (const bool b);
};
#endif // ADCDMA_H