bsp:ls2k:gpio read typo error,fix it.
from ls2k user manuanl know that GPIO0_I is input, GPIO1_I is reserved. here typo error, fix it.
This commit is contained in:
parent
b4f75d1ef8
commit
9d742141b8
|
@ -73,7 +73,7 @@ static int loongson_pin_read(struct rt_device *device, rt_base_t pin)
|
||||||
gpio = (void *)device->user_data;
|
gpio = (void *)device->user_data;
|
||||||
rt_uint64_t m;
|
rt_uint64_t m;
|
||||||
|
|
||||||
m = gpio->GPIO1_I;
|
m = gpio->GPIO0_I;
|
||||||
m &= (rt_uint64_t)1 << pin;
|
m &= (rt_uint64_t)1 << pin;
|
||||||
|
|
||||||
rc = !!m;
|
rc = !!m;
|
||||||
|
|
Loading…
Reference in New Issue