Skip to content

Commit

Permalink
chore: 2.10 version of #5190 GPIO code
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeerick committed Jun 19, 2024
1 parent bbf787f commit e9eda9a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions radio/src/targets/common/arm/stm32/pwr_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ void pwrInit()
GPIO_Init(PWR_EXTRA_SWITCH_GPIO, &GPIO_InitStructure);
#endif

// Aux serial port power
#if defined(AUX_SERIAL_PWR_GPIO)
GPIO_InitStructure.GPIO_Pin = AUX_SERIAL_PWR_GPIO_PIN;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
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_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_Init(AUX2_SERIAL_PWR_GPIO, &GPIO_InitStructure);
#endif

#if defined(PCBREV_HARDCODED)
hardwareOptions.pcbrev = PCBREV_HARDCODED;
#elif defined(PCBREV_GPIO_PIN)
Expand All @@ -81,14 +93,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 e9eda9a

Please sign in to comment.