guowenxue
2021-04-21 af30c84d820576c37e57de31bc47d18b6e4b89e1
iotd/hal/gpio.c
@@ -117,7 +117,7 @@
    gpiod_chip_close(s_chip);
}
void gpio_out(char *name, int cmd)
void gpio_out(char *name, char *cmd)
{
    int              i;
    int              found = 0;
@@ -137,11 +137,11 @@
        return ;
    }
    if( OFF == cmd )
    if( strstr(cmd, "on") )
    {
        gpiod_line_set_value(s_gpio->output[i].line, s_gpio->output[i].active_level);
    }
    else
    else if( strstr(cmd, "off") )
    {
        gpiod_line_set_value(s_gpio->output[i].line, !s_gpio->output[i].active_level);
    }