Skip to content

Commit

Permalink
chore: 2.10 version of #5190 GPIO code (#5197)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeerick authored Jun 19, 2024
1 parent bbf787f commit be2340c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions radio/src/targets/common/arm/stm32/pwr_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ void pwrInit()
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;

// Aux serial port power
#if defined(AUX_SERIAL_PWR_GPIO)
GPIO_InitStructure.GPIO_Pin = AUX_SERIAL_PWR_GPIO_PIN;
GPIO_Init(AUX_SERIAL_PWR_GPIO, &GPIO_InitStructure);
#endif
#if defined(AUX2_SERIAL_PWR_GPIO)
GPIO_InitStructure.GPIO_Pin = AUX2_SERIAL_PWR_GPIO_PIN;
GPIO_Init(AUX2_SERIAL_PWR_GPIO, &GPIO_InitStructure);
#endif

#if defined(INTMODULE_BOOTCMD_GPIO)
INIT_INTMODULE_BOOTCMD_PIN();
GPIO_InitStructure.GPIO_Pin = INTMODULE_BOOTCMD_GPIO_PIN;
Expand Down Expand Up @@ -81,14 +91,6 @@ void pwrInit()

hardwareOptions.pcbrev = PCBREV_VALUE();
#endif

// Aux serial port power
#if defined(AUX_SERIAL_PWR_GPIO)
gpio_init(AUX_SERIAL_PWR_GPIO, GPIO_OUT, GPIO_PIN_SPEED_LOW);
#endif
#if defined(AUX2_SERIAL_PWR_GPIO)
gpio_init(AUX2_SERIAL_PWR_GPIO, GPIO_OUT, GPIO_PIN_SPEED_LOW);
#endif
}

void pwrOn()
Expand Down

0 comments on commit be2340c

Please sign in to comment.