cpu/stm32f4: optimized GPIO driver implementation