nrf5/hal/gpio: Add function to clear output register using a pin mask.

This commit is contained in:
Glenn Ruben Bakke 2017-05-08 21:20:08 +02:00
parent 94efa02084
commit a4513f0159
1 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,10 @@ static inline void hal_gpio_out_set(uint8_t port, uint32_t pin_mask) {
GPIO_BASE(port)->OUTSET = pin_mask;
}
static inline void hal_gpio_out_clear(uint8_t port, uint32_t pin_mask) {
GPIO_BASE(port)->OUTCLR = pin_mask;
}
static inline void hal_gpio_pin_set(uint8_t port, uint32_t pin) {
GPIO_BASE(port)->OUTSET = (1 << pin);
}