Add oven PWM controller

This commit is contained in:
2020-05-10 23:13:03 +02:00
parent 4f05c084d9
commit 8d6c81441d
5 changed files with 67 additions and 1 deletions

View File

@@ -27,7 +27,7 @@
#define PULLUP(pin) (0x1U << ((pin)* 2))
#define ALTFUNC(pin) ((0x2) << ((pin) * 2))
#define PINMASK(pin) ((0x3) << ((pin) * 2))
#define SETAF(PORT,PIN,AF) PORT->AFR[((PIN) < 8 ? 0 : 1)] |= AF << (((PIN) < 8 ? (PIN) : ((PIN) - 8)) * 4)
#define SETAF(PORT,PIN,AF) PORT->AFR[((PIN) < 8 ? 0 : 1)] |= (AF) << (((PIN) < 8 ? (PIN) : ((PIN) - 8)) * 4)
#define ANALOG(pin) (0x03 << ((pin) * 2))
#define OTYP_OPENDRAIN(pin) (0x1U << (pin))