From 3fd075b48bfe80ef7d7f61c1f6229c3aa413383e Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 20 Jan 2023 15:29:23 +0700 Subject: [PATCH] fix warning --- examples/device/video_capture/src/usb_descriptors.c | 1 + hw/bsp/stm32f0/family.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/device/video_capture/src/usb_descriptors.c b/examples/device/video_capture/src/usb_descriptors.c index 499ee311c..0cf772010 100644 --- a/examples/device/video_capture/src/usb_descriptors.c +++ b/examples/device/video_capture/src/usb_descriptors.c @@ -99,6 +99,7 @@ uint8_t const desc_fs_configuration[] = { // Config number, interface count, string index, total length, attribute, power in mA TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0, 500), + // IAD for Video Control #if defined(CFG_EXAMPLE_VIDEO_READONLY) && !defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG) TUD_VIDEO_CAPTURE_DESCRIPTOR_MJPEG(4, EPNUM_VIDEO_IN, 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)