Skip to content

Commit

Permalink
fix: conditional code problem due to new gpio driver (EdgeTX#5241)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardclli authored Jul 4, 2024
1 parent 39a7fcc commit 45acf21
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 856 deletions.
2 changes: 1 addition & 1 deletion radio/src/targets/common/arm/stm32/pwr_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void pwrInit()
hardwareOptions.pcbrev = PCBREV_VALUE();
#elif defined(PCBREV_GPIO_1) && defined(PCBREV_GPIO_2)
gpio_init(PCBREV_GPIO_1, GPIO_IN_PU, GPIO_PIN_SPEED_LOW);
#if defined(PCBREV_TOUCH_GPIO_PIN)
#if defined(PCBREV_TOUCH_GPIO)
#if defined(PCBREV_TOUCH_GPIO_PULL_UP)
gpio_init(PCBREV_GPIO_2, GPIO_IN_PU, GPIO_PIN_SPEED_LOW);
#else
Expand Down
2 changes: 1 addition & 1 deletion radio/src/targets/common/arm/stm32/usb_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
#endif

/****************** USB OTG MISC CONFIGURATION ********************************/
#if defined(USB_GPIO_PIN_VBUS)
#if defined(USB_GPIO_VBUS)
#define VBUS_SENSING_ENABLED
#endif

Expand Down
2 changes: 1 addition & 1 deletion radio/src/targets/nv14/hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
// USB
#define USB_RCC_AHB1Periph_GPIO RCC_AHB1Periph_GPIOA
#define USB_GPIO GPIOA
#define USB_GPIO_VBUS GPIO_PIN(GPIOA,9) // PA.09
#define USB_GPIO_VBUS GPIO_PIN(GPIOA, 9) // PA.09
#define USB_GPIO_DM GPIO_PIN(GPIOA, 11) // PA.11
#define USB_GPIO_DP GPIO_PIN(GPIOA, 12) // PA.12
#define USB_GPIO_AF GPIO_AF10
Expand Down
2 changes: 1 addition & 1 deletion radio/src/targets/pl18/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ extern "C" void SDRAM_Init();
#define BLUETOOTH_MODULE_ON() gpio_clear(BLUETOOTH_ON_GPIO)
#define BLUETOOTH_MODULE_OFF() gpio_set(BLUETOOTH_ON_GPIO)
#define IS_INTERNAL_MODULE_ON() (false)
#define IS_EXTERNAL_MODULE_ON() (GPIO_ReadInputDataBit(EXTMODULE_PWR_GPIO, EXTMODULE_PWR_GPIO_PIN) == Bit_SET)
#define IS_EXTERNAL_MODULE_ON() (gpio_read(EXTMODULE_PWR_GPIO) ? 1 : 0)

#else

Expand Down
Loading

0 comments on commit 45acf21

Please sign in to comment.