Browse Source

fixed drv_gpio bug

Hehesheng 5 years ago
parent
commit
4fe5ce75c4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bsp/k210/driver/drv_gpio.c

+ 1 - 1
bsp/k210/driver/drv_gpio.c

@@ -257,7 +257,7 @@ const static struct rt_pin_ops drv_pin_ops =
 int rt_hw_pin_init(void)
 int rt_hw_pin_init(void)
 {
 {
     rt_err_t ret = RT_EOK;
     rt_err_t ret = RT_EOK;
-    memset(pin_alloc_table, 0, sizeof pin_alloc_table);
+    memset(pin_alloc_table, -1, sizeof pin_alloc_table);
     free_pin = GPIO_ALLOC_START;
     free_pin = GPIO_ALLOC_START;
     ret = rt_device_pin_register("pin", &drv_pin_ops, RT_NULL);
     ret = rt_device_pin_register("pin", &drv_pin_ops, RT_NULL);