[bsp/at32] fixed auto check error
This commit is contained in:
parent
ec465d6bc4
commit
2352d3e310
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue