]> mj.ucw.cz Git - home-hw.git/blobdiff - nucleo-test/Src/main.c
Hračka pro Meggy, v1
[home-hw.git] / nucleo-test / Src / main.c
index fdc17e9056d538144f80a740a36c0ed72d5d1f49..8cd5c6d3802816529d2a049a1aa7a1dfe40d2f19 100644 (file)
@@ -407,6 +407,18 @@ static void MX_GPIO_Init(void)
   /**/
   LL_GPIO_ResetOutputPin(LD2_GPIO_Port, LD2_Pin);
 
+  /**/
+  LL_GPIO_ResetOutputPin(MEGGY1_GPIO_Port, MEGGY1_Pin);
+
+  /**/
+  LL_GPIO_ResetOutputPin(MEGGY2_GPIO_Port, MEGGY2_Pin);
+
+  /**/
+  LL_GPIO_ResetOutputPin(MEGGY3_GPIO_Port, MEGGY3_Pin);
+
+  /**/
+  LL_GPIO_ResetOutputPin(MEGGY4_GPIO_Port, MEGGY4_Pin);
+
   /**/
   LL_SYSCFG_SetEXTISource(LL_SYSCFG_EXTI_PORTC, LL_SYSCFG_EXTI_LINE13);
 
@@ -431,6 +443,38 @@ static void MX_GPIO_Init(void)
   GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
   LL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct);
 
+  /**/
+  GPIO_InitStruct.Pin = MEGGY1_Pin;
+  GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
+  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
+  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
+  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
+  LL_GPIO_Init(MEGGY1_GPIO_Port, &GPIO_InitStruct);
+
+  /**/
+  GPIO_InitStruct.Pin = MEGGY2_Pin;
+  GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
+  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
+  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
+  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
+  LL_GPIO_Init(MEGGY2_GPIO_Port, &GPIO_InitStruct);
+
+  /**/
+  GPIO_InitStruct.Pin = MEGGY3_Pin;
+  GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
+  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
+  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
+  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
+  LL_GPIO_Init(MEGGY3_GPIO_Port, &GPIO_InitStruct);
+
+  /**/
+  GPIO_InitStruct.Pin = MEGGY4_Pin;
+  GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
+  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
+  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
+  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
+  LL_GPIO_Init(MEGGY4_GPIO_Port, &GPIO_InitStruct);
+
   /**/
   GPIO_InitStruct.Pin = BMP_DONE_Pin;
   GPIO_InitStruct.Mode = LL_GPIO_MODE_INPUT;