summaryrefslogtreecommitdiff
path: root/hw/bsp/stm32wba
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-03-06 10:59:32 +0700
committerhathach <[email protected]>2026-03-06 11:26:00 +0700
commit94baf394686f92d9edaf109dcae30fa7b531fefc (patch)
tree6d4ca5a131c2a5c73f6649c292c1349d16648535 /hw/bsp/stm32wba
parent61e4b9ce3fba2fea731396c56eee1c7b5a2f5338 (diff)
fix warnings
Diffstat (limited to 'hw/bsp/stm32wba')
-rw-r--r--hw/bsp/stm32wba/family.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/bsp/stm32wba/family.c b/hw/bsp/stm32wba/family.c
index e058a80a1..878355b48 100644
--- a/hw/bsp/stm32wba/family.c
+++ b/hw/bsp/stm32wba/family.c
@@ -175,7 +175,10 @@ void board_init(void) {
#endif // USB_OTG_HS
}
-void board_led_write(bool state) { HAL_GPIO_WritePin(LED_PORT, LED_PIN, state ? LED_STATE_ON : (1 - LED_STATE_ON)); }
+void board_led_write(bool state) {
+ GPIO_PinState pin_state = (GPIO_PinState)(state ? LED_STATE_ON : (1 - LED_STATE_ON));
+ HAL_GPIO_WritePin(LED_PORT, LED_PIN, pin_state);
+}
uint32_t board_button_read(void) { return HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN) == BUTTON_STATE_ACTIVE; }