added lpf filter, pwm output

This commit is contained in:
2022-09-10 16:23:33 +02:00
parent 12347b2df2
commit 8c1c99f27f
6 changed files with 264 additions and 31 deletions
+18
View File
@@ -0,0 +1,18 @@
/*
* Copyright 2022 Oleg Borodin <borodin@unix7.org>
*/
#ifndef FILTER_H_QWERTY
#define FILTER_H_QWERTY
typedef struct {
double x0;
double x1;
double rc;
} lpf_t;
void lpf_init(lpf_t *lpf, double freq);
double lpf_apply(lpf_t *lpf, double x2, double dt);
#endif