|
|
|
@ -889,12 +889,12 @@ void doMode (int argc, char *argv [])
|
|
|
|
|
else if (strcasecmp (mode, "down") == 0) pullUpDnControl (pin, PUD_DOWN) ; |
|
|
|
|
else if (strcasecmp (mode, "tri") == 0) pullUpDnControl (pin, PUD_OFF) ; |
|
|
|
|
else if (strcasecmp (mode, "off") == 0) pullUpDnControl (pin, PUD_OFF) ; |
|
|
|
|
else if (strcasecmp (mode, "alt0") == 0) pinModeAlt (pin, 0b100) ; |
|
|
|
|
else if (strcasecmp (mode, "alt1") == 0) pinModeAlt (pin, 0b101) ; |
|
|
|
|
else if (strcasecmp (mode, "alt2") == 0) pinModeAlt (pin, 0b110) ; |
|
|
|
|
else if (strcasecmp (mode, "alt3") == 0) pinModeAlt (pin, 0b111) ; |
|
|
|
|
else if (strcasecmp (mode, "alt4") == 0) pinModeAlt (pin, 0b011) ; |
|
|
|
|
else if (strcasecmp (mode, "alt5") == 0) pinModeAlt (pin, 0b010) ; |
|
|
|
|
else if (strcasecmp (mode, "alt2") == 0) pinModeAlt (pin, 0b010) ; |
|
|
|
|
else if (strcasecmp (mode, "alt3") == 0) pinModeAlt (pin, 0b011) ; |
|
|
|
|
else if (strcasecmp (mode, "alt4") == 0) pinModeAlt (pin, 0b100) ; |
|
|
|
|
else if (strcasecmp (mode, "alt5") == 0) pinModeAlt (pin, 0b101) ; |
|
|
|
|
else if (strcasecmp (mode, "alt6") == 0) pinModeAlt (pin, 0b110) ; |
|
|
|
|
else if (strcasecmp (mode, "alt7") == 0) pinModeAlt (pin, 0b111) ; |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
fprintf (stderr, "%s: Invalid mode: %s. Should be in/out/pwm/clock/up/down/tri\n", argv [1], mode) ; |
|
|
|
|