From 9d742141b8d8d0a2c05a14415f35101847199213 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 24 Aug 2020 09:12:41 +0800 Subject: [PATCH] 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. --- bsp/ls2kdev/drivers/drv_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/ls2kdev/drivers/drv_gpio.c b/bsp/ls2kdev/drivers/drv_gpio.c index e1c5d61331..155807461f 100644 --- a/bsp/ls2kdev/drivers/drv_gpio.c +++ b/bsp/ls2kdev/drivers/drv_gpio.c @@ -73,7 +73,7 @@ static int loongson_pin_read(struct rt_device *device, rt_base_t pin) gpio = (void *)device->user_data; rt_uint64_t m; - m = gpio->GPIO1_I; + m = gpio->GPIO0_I; m &= (rt_uint64_t)1 << pin; rc = !!m;