mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/stm32: stm32f4 BRR from BSRR
This commit is contained in:
parent
84a3078a93
commit
f8a64dfb1c
@ -77,7 +77,9 @@ static inline void gpio_ll_clear(gpio_port_t port, uword_t mask)
|
||||
#if defined(GPIO_BRR_BR0) && !defined(CPU_FAM_STM32F4)
|
||||
p->BRR = mask;
|
||||
#else
|
||||
p->BSRR = mask << 16;
|
||||
/* The first half-word sets GPIOs, the second half-world clears GPIOs */
|
||||
volatile uint16_t *brr = (volatile uint16_t *)&(p->BSRR);
|
||||
brr[1] = (uint16_t)mask;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user