[bsp/at32] fixed auto check error

This commit is contained in:
sheltonyu 2023-04-07 14:55:53 +08:00 committed by Man, Jianting (Meco)
parent ec465d6bc4
commit 2352d3e310
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}