From 2352d3e310a73c3ddeb56c2cd13df43ec03ad79e Mon Sep 17 00:00:00 2001 From: sheltonyu Date: Fri, 7 Apr 2023 14:55:53 +0800 Subject: [PATCH] [bsp/at32] fixed auto check error --- bsp/at32/libraries/rt_drivers/drv_gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsp/at32/libraries/rt_drivers/drv_gpio.c b/bsp/at32/libraries/rt_drivers/drv_gpio.c index 344ba77a95..1858bb5112 100644 --- a/bsp/at32/libraries/rt_drivers/drv_gpio.c +++ b/bsp/at32/libraries/rt_drivers/drv_gpio.c @@ -260,10 +260,10 @@ static void at32_pin_mode(rt_device_t dev, rt_base_t pin, rt_uint8_t mode) rt_inline rt_int32_t bit2bitno(rt_uint32_t bit) { - int i; + rt_int32_t i; for (i = 0; i < 32; i++) { - if ((0x01 << i) == bit) + if (((rt_uint32_t)0x01 << i) == bit) { return i; }