guowenxue
2021-04-21 99ecb3dc2f1c7b093e89e50c8f50718541da59ea
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);
    }