summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-01-20 15:29:23 +0700
committerhathach <[email protected]>2023-01-20 15:29:23 +0700
commit3fd075b48bfe80ef7d7f61c1f6229c3aa413383e (patch)
treefcb987d96cb39565c90d05fe054a4d01550458ba /hw
parent84be70baf5eaada4317c0483c33580bcde4116de (diff)
fix warning
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/stm32f0/family.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/bsp/stm32f0/family.c b/hw/bsp/stm32f0/family.c
index 806c4af51..a7e914128 100644
--- a/hw/bsp/stm32f0/family.c
+++ b/hw/bsp/stm32f0/family.c
@@ -118,7 +118,8 @@ void board_init(void)
void board_led_write(bool state)
{
- HAL_GPIO_WritePin(LED_PORT, LED_PIN, state ? LED_STATE_ON : (1-LED_STATE_ON));
+ 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)