File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U) Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -109,14 +109,20 @@ WEAK void initVariant(void)
109109 {
110110 __HAL_RCC_GPIOH_CLK_ENABLE ();
111111 GPIO_InitTypeDef GPIO_InitStruct = {};
112- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
113112 GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
114- /* PH0 is ENABLE_3V3, PH1 is DISCHARGE_3V3 */
115- GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1;
113+
114+ /* PH0 is ENABLE_3V3 */
115+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
116+ GPIO_InitStruct.Pin = GPIO_PIN_0;
117+ HAL_GPIO_Init (GPIOH, &GPIO_InitStruct);
118+
119+ /* PH1 is DISCHARGE_3V3 */
120+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
121+ GPIO_InitStruct.Pin = GPIO_PIN_1;
116122 HAL_GPIO_Init (GPIOH, &GPIO_InitStruct);
117123
118124 /* Enable 3V3 regulator and disable discharging */
119- HAL_GPIO_WritePin (GPIOH, GPIO_InitStruct. Pin , GPIO_PIN_SET);
125+ HAL_GPIO_WritePin (GPIOH, (GPIO_PIN_0 | GPIO_PIN_1) , GPIO_PIN_SET);
120126 }
121127}
122128
You can’t perform that action at this time.
0 commit comments