21 lines
465 B
C
21 lines
465 B
C
|
#ifndef ADCDMA_H
|
||
|
#define ADCDMA_H
|
||
|
#include <stdint.h>
|
||
|
#include "oneway.h"
|
||
|
|
||
|
static constexpr unsigned HALF_LEN = 0x80u;
|
||
|
static constexpr unsigned FULL_LEN = HALF_LEN * 2u;
|
||
|
|
||
|
class AdcDma {
|
||
|
uint16_t * pL;
|
||
|
uint16_t * pH;
|
||
|
uint16_t buffer [FULL_LEN];
|
||
|
OneWay<uint16_t> * dst;
|
||
|
public:
|
||
|
explicit AdcDma () noexcept;
|
||
|
void attach (OneWay<uint16_t> & d) { dst = & d; }
|
||
|
void send (const bool b);
|
||
|
};
|
||
|
|
||
|
#endif // ADCDMA_H
|