Explorar el Código

Fix all input-mode pin init.

Vladimir N. Shilov hace 3 años
padre
commit
61f08f4384
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      Src/board.c

+ 5 - 0
Src/board.c

@@ -314,12 +314,17 @@ static void GPIO_Init(void)
 
   /* UART_State: input, pull up */
   GPIO_SetPinPull(UART_ST_GPIO_Port, UART_ST_Pin, GPIO_PUPDR_UP);
+  GPIO_SetPinMode(UART_ST_GPIO_Port, UART_ST_Pin, GPIO_MODE_IN);
 
   /* BTN1, BTN2, BTN3, BTN4: input, pull up */
   GPIO_SetPinPull(BTN1_GPIO_Port, BTN1_Pin, GPIO_PUPDR_UP);
+  GPIO_SetPinMode(BTN1_GPIO_Port, BTN1_Pin, GPIO_MODE_IN);
   GPIO_SetPinPull(BTN2_GPIO_Port, BTN2_Pin, GPIO_PUPDR_UP);
+  GPIO_SetPinMode(BTN2_GPIO_Port, BTN2_Pin, GPIO_MODE_IN);
   GPIO_SetPinPull(BTN3_GPIO_Port, BTN3_Pin, GPIO_PUPDR_UP);
+  GPIO_SetPinMode(BTN4_GPIO_Port, BTN3_Pin, GPIO_MODE_IN);
   GPIO_SetPinPull(BTN4_GPIO_Port, BTN4_Pin, GPIO_PUPDR_UP);
+  GPIO_SetPinMode(BTN4_GPIO_Port, BTN4_Pin, GPIO_MODE_IN);
 }
 
 /**