fix warning

This commit is contained in:
hathach
2023-01-20 15:29:23 +07:00
parent 84be70baf5
commit 3fd075b48b
2 changed files with 3 additions and 1 deletions

View File

@@ -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)