X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=Src%2Fmain.c;h=ec83544e774cf5d3a3ed2e335ba7cabbe66e6562;hb=599c48d5ae1e3e08197684607fc35a2cc40021b0;hp=5552021b51cf1363a354f4f95d78a65ea84fd830;hpb=c82c41fd514268a56344f336982c52eadc8ff044;p=home-hw.git diff --git a/Src/main.c b/Src/main.c index 5552021..ec83544 100644 --- a/Src/main.c +++ b/Src/main.c @@ -194,10 +194,10 @@ static void MX_I2C1_Init(void) LL_GPIO_InitTypeDef GPIO_InitStruct; /**I2C1 GPIO Configuration - PB6 ------> I2C1_SCL - PB7 ------> I2C1_SDA + PB8 ------> I2C1_SCL + PB9 ------> I2C1_SDA */ - GPIO_InitStruct.Pin = LL_GPIO_PIN_6; + GPIO_InitStruct.Pin = LL_GPIO_PIN_8; GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE; GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_OPENDRAIN; @@ -205,7 +205,7 @@ static void MX_I2C1_Init(void) GPIO_InitStruct.Alternate = LL_GPIO_AF_1; LL_GPIO_Init(GPIOB, &GPIO_InitStruct); - GPIO_InitStruct.Pin = LL_GPIO_PIN_7; + GPIO_InitStruct.Pin = LL_GPIO_PIN_9; GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE; GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_OPENDRAIN; @@ -299,8 +299,8 @@ static void MX_USART2_UART_Init(void) static void MX_GPIO_Init(void) { - LL_EXTI_InitTypeDef EXTI_InitStruct; LL_GPIO_InitTypeDef GPIO_InitStruct; + LL_EXTI_InitTypeDef EXTI_InitStruct; /* GPIO Ports Clock Enable */ LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOC); @@ -315,10 +315,10 @@ static void MX_GPIO_Init(void) LL_SYSCFG_SetEXTISource(LL_SYSCFG_EXTI_PORTC, LL_SYSCFG_EXTI_LINE13); /**/ - LL_GPIO_SetPinPull(B1_GPIO_Port, B1_Pin, LL_GPIO_PULL_NO); + LL_GPIO_SetPinPull(BLUE_BUTTON_GPIO_Port, BLUE_BUTTON_Pin, LL_GPIO_PULL_NO); /**/ - LL_GPIO_SetPinMode(B1_GPIO_Port, B1_Pin, LL_GPIO_MODE_INPUT); + LL_GPIO_SetPinMode(BLUE_BUTTON_GPIO_Port, BLUE_BUTTON_Pin, LL_GPIO_MODE_INPUT); /**/ EXTI_InitStruct.Line_0_31 = LL_EXTI_LINE_13; @@ -335,6 +335,12 @@ static void MX_GPIO_Init(void) GPIO_InitStruct.Pull = LL_GPIO_PULL_NO; LL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct); + /**/ + GPIO_InitStruct.Pin = BMP_DONE_Pin; + GPIO_InitStruct.Mode = LL_GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = LL_GPIO_PULL_NO; + LL_GPIO_Init(BMP_DONE_GPIO_Port, &GPIO_InitStruct); + } /* USER CODE BEGIN 4 */