RISC-V/common/adcdma.h

22 lines
407 B
C
Raw Normal View History

2024-03-07 12:23:44 +01:00
#ifndef ADCDMA_H
#define ADCDMA_H
2024-03-04 22:23:14 +01:00
#include <stdint.h>
class OneWay;
static constexpr unsigned HALF_LEN = 120u;
static constexpr unsigned FULL_LEN = HALF_LEN * 2u;
2024-03-07 12:23:44 +01:00
class AdcDma {
2024-03-04 22:23:14 +01:00
uint16_t * pL;
uint16_t * pH;
uint16_t buffer [FULL_LEN];
OneWay * dst;
public:
2024-03-07 12:23:44 +01:00
explicit AdcDma () noexcept;
2024-03-04 22:23:14 +01:00
void attach (OneWay & d) { dst = & d; }
void send (const bool b);
};
2024-03-07 12:23:44 +01:00
#endif // ADCDMA_H