Add pupdr macros

This commit is contained in:
Mario Hüttel 2020-02-23 21:48:30 +01:00
parent 6965882435
commit 6700b0ea81

View File

@ -22,6 +22,7 @@
#define __STM32GPIOMACROS_H__ #define __STM32GPIOMACROS_H__
#define MODER_DELETE(pin) ~(0x3U << (pin * 2)) #define MODER_DELETE(pin) ~(0x3U << (pin * 2))
#define PUPDR_DELETE(pin) ~(0x3U << (pin * 2))
#define OUTPUT(pin) (0x01U << (pin * 2)) #define OUTPUT(pin) (0x01U << (pin * 2))
#define PULLUP(pin) (0x1U << (pin* 2)) #define PULLUP(pin) (0x1U << (pin* 2))
#define ALTFUNC(pin) ((0x2) << (pin * 2)) #define ALTFUNC(pin) ((0x2) << (pin * 2))