]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/cmd_gpio.c
Adaptions for fatfs R0.13b
[z180-stamp.git] / avr / cmd_gpio.c
index e0d9b06e9f3fb36f6266c8e6558f21b739d63afc..5cc02d0d46bc1d3ebb1bf331f29206fb8ac9a8ac 100644 (file)
@@ -35,9 +35,9 @@ static void pinnames_get(void)
        memset(pin_names, 0, sizeof(pin_names));
        pin_names_width = 0;
 
-/* TODO: enters endless loop on wron parameters */
+/* TODO: enters endless loop on wrong parameters */
 
-       if ((lp = getenv(PSTR(ENV_PINALIAS))) != NULL) {
+       if ((lp = getenv_str(PSTR(ENV_PINALIAS))) != NULL) {
                pin_names[namestr] = strdup(lp);
                ptr = strtok_P(pin_names[namestr], delim1);
                while (ptr != NULL) {
@@ -185,7 +185,7 @@ command_ret_t do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
        (void) cmdtp; (void) flag;
 
        /* reset getopt() */
-       optind = 1;
+       optind = 0;
 
        int opt;
        while ((opt = getopt(argc, argv, PSTR("s"))) != -1) {