diff --git a/src/gpio.c b/src/gpio.c --- a/src/gpio.c +++ b/src/gpio.c @@ -10,13 +10,23 @@ void gpio_init(void) __GPIOA_CLK_ENABLE(); __GPIOB_CLK_ENABLE(); - /*Configure GPIO pins : PFPin PFPin */ + + // Oscillator enable pin GPIO_InitStruct.Pin = OSC_EN_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_LOW; HAL_GPIO_Init(GPIOF, &GPIO_InitStruct); + + // GPS enable pin + GPIO_InitStruct.Pin = GPS_NEN_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_LOW; + HAL_GPIO_Init(GPS_NEN_GPIO_Port, &GPIO_InitStruct); + + /*Configure GPIO pins : PA0 PA2 PA3 PA4 PA5 PA7 PA15 */ GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4 @@ -25,11 +35,11 @@ void gpio_init(void) GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - /*Configure GPIO pin : PA1 */ - GPIO_InitStruct.Pin = GPIO_PIN_1; - GPIO_InitStruct.Mode = GPIO_MODE_EVT_RISING; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); +// /*Configure GPIO pin : PA1 */ +// GPIO_InitStruct.Pin = GPIO_PIN_1; +// GPIO_InitStruct.Mode = GPIO_MODE_EVT_RISING; +// GPIO_InitStruct.Pull = GPIO_NOPULL; +// HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /*Configure GPIO pin : PtPin */ GPIO_InitStruct.Pin = LED_BLUE_Pin;