diff options
-rw-r--r-- | gpio/gpio.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gpio/gpio.h b/gpio/gpio.h index 705f3cf..8eb2eea 100644 --- a/gpio/gpio.h +++ b/gpio/gpio.h @@ -165,6 +165,10 @@ class GPIO_t { g.reg.MODER = (g.reg.MODER & ~mask2()) | ((0x55555555 * m) & mask2()); } + void set_type(Pin::Type t) { + g.reg.OTYPER = (g.reg.OTYPER & ~mask2()) | ((0x55555555 * t) & mask2()); + } + void set_pull(Pin::Pull p) { g.reg.PUPDR = (g.reg.PUPDR & ~mask2()) | ((0x55555555 * p) & mask2()); } |