Add pupdr macros
This commit is contained in:
parent
6965882435
commit
6700b0ea81
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user