This commit is contained in:
2025-05-13 01:34:53 +03:00
parent 427735e23d
commit 83f3f1c7d4
945 changed files with 633484 additions and 0 deletions
@@ -0,0 +1,22 @@
#ifndef __PWM_INPUT_HPP
#define __PWM_INPUT_HPP
#include <tim.h>
#include <array>
class PwmInput {
public:
PwmInput(TIM_HandleTypeDef* htim, std::array<uint16_t, 4> gpios)
: htim_(htim), gpios_(gpios) {}
void init();
void on_capture();
private:
void on_capture(int channel, uint32_t timestamp);
TIM_HandleTypeDef* htim_;
std::array<uint16_t, 4> gpios_;
};
#endif // __PWM_INPUT_HPP