22 lines
417 B
C
22 lines
417 B
C
|
#ifndef ADCCLASS_H
|
||
|
#define ADCCLASS_H
|
||
|
#include <stdint.h>
|
||
|
|
||
|
class OneWay;
|
||
|
static constexpr unsigned HALF_LEN = 120u;
|
||
|
static constexpr unsigned FULL_LEN = HALF_LEN * 2u;
|
||
|
|
||
|
class AdcClass {
|
||
|
uint16_t * pL;
|
||
|
uint16_t * pH;
|
||
|
uint16_t buffer [FULL_LEN];
|
||
|
OneWay * dst;
|
||
|
public:
|
||
|
explicit AdcClass () noexcept;
|
||
|
void attach (OneWay & d) { dst = & d; }
|
||
|
void send (const bool b);
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif // ADCCLASS_H
|