14 lines
431 B
C++
14 lines
431 B
C++
#ifndef GENERATOR_H
|
|
#define GENERATOR_H
|
|
#include "oneway.h"
|
|
/* Něco jako DDS, přesná frekvence není řešena (závisí na TIM1). */
|
|
class Generator : public OneWay {
|
|
unsigned base, freq;
|
|
public:
|
|
explicit constexpr Generator (const unsigned f) noexcept : OneWay(), base(0u), freq (f) {};
|
|
unsigned Send (uint16_t * const ptr, const unsigned len) override;
|
|
protected:
|
|
int16_t step ();
|
|
};
|
|
|
|
#endif // GENERATOR_H
|