X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/972e6e9bc05f0d3d868357029a6da2354f2cdb36..c82e9b3342cb1971d2d6e66d4537f2ae3ba6c72c:/avr/cmd_gpio.c diff --git a/avr/cmd_gpio.c b/avr/cmd_gpio.c index 65a71be..16c2202 100644 --- a/avr/cmd_gpio.c +++ b/avr/cmd_gpio.c @@ -5,8 +5,6 @@ */ #include "cmd_gpio.h" -#include - #include "print-utils.h" #include "getopt-min.h" #include "env.h" @@ -173,9 +171,6 @@ command_ret_t do_gpio(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED, int arg uint_fast8_t pinarg[GPIO_MAX]; uint_fast8_t pinargc; - /* reset getopt() */ - optind = 0; - int opt; while ((opt = getopt(argc, argv, PSTR("s"))) != -1) { switch (opt) { @@ -250,6 +245,7 @@ command_ret_t do_gpio(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED, int arg switch (toupper(argv[optind][0])) { case 'H': level = 1; + /* FALL TROUGH */ case 'L': mode = OUTPUT; break; @@ -266,6 +262,7 @@ command_ret_t do_gpio(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED, int arg switch (*endp) { case 'M': value *= 1000; + /* FALL TROUGH */ case 'K': value *= 1000; endp++;