Set all output GPIOs to output

No final setup yet for SW_ON and BOOTSTRAP_PULSE. These are currently
just low (== off) after power-on.
This commit is contained in:
Thomas Kolb 2016-08-05 00:27:40 +02:00
parent c56e00a084
commit 99447b3454
1 changed files with 14 additions and 0 deletions

View File

@ -23,6 +23,20 @@ static void init_gpio(void)
// Set up UART TX on PB6 for debugging
gpio_mode_setup(GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO6);
gpio_set_af(GPIOB, GPIO_AF0, GPIO6);
// GPIO for converter switch
// FIXME: AF
gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO8);
gpio_clear(GPIOA, GPIO8);
// GPIO for bootstrap pulse
// FIXME: AF
gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO9);
gpio_clear(GPIOA, GPIO9);
// GPIO for load activation
gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO15);
gpio_set(GPIOA, GPIO15);
}
static void init_clock(void)