stm32f4: Encode mode/func into single parameter of gpio_peripheral

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-07-28 11:32:56 -04:00
parent 7d4c475e52
commit ef0784afe6
5 changed files with 13 additions and 12 deletions

View File

@@ -28,8 +28,8 @@ serial_init(void)
NVIC_SetPriority(USART2_IRQn, 0);
NVIC_EnableIRQ(USART2_IRQn);
gpio_peripheral(GPIO('A', 2), GPIO_FUNCTION, 7, 0);
gpio_peripheral(GPIO('A', 3), GPIO_FUNCTION, 7, 1);
gpio_peripheral(GPIO('A', 2), GPIO_FUNCTION(7), 0);
gpio_peripheral(GPIO('A', 3), GPIO_FUNCTION(7), 1);
}
DECL_INIT(serial_init);