Handle PWM on pin PD4, PD5 and PD7

This commit is contained in:
2024-09-02 20:48:17 +02:00
parent bd34ab7c3a
commit d60efc009e
5 changed files with 127 additions and 21 deletions

View File

@@ -3,11 +3,15 @@
#include <stdarg.h>
#define BIT(n) (0x1U << (n))
#define UNUSED(s) (void)(s)
#define BIT(n) (0x1U << (n))
#define UNUSED(s) (void)(s)
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define CLAMP(n, hi, lo) (MIN(hi, MAX(n, lo)))
void Info(const char *fmt, ...);
void Error(const char *fmt, ...);
double Clamp(double n, double upper, double lower);
#include <util/delay.h>
#define Sleep(ms) _delay_ms(ms)