aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>2023-06-29 15:39:44 +0200
committerQuentin Schulz <quentin.schulz@theobroma-systems.com>2023-08-04 13:33:31 +0200
commit9f36e0071b7781fc570eec23d5251f28d6169f2a (patch)
tree9319b1313d55ea5978ba803d734828f2578abe3e
parentd2982440f4eb7c151ec40d44d46c84ac73114dbe (diff)
usb-control: cp2102_simple: fix do_status
The wrong variable names were used for comparison so let's use the proper ones. Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
-rw-r--r--usb-control/cp2102_simple.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/usb-control/cp2102_simple.py b/usb-control/cp2102_simple.py
index d2259f4..6c9131a 100644
--- a/usb-control/cp2102_simple.py
+++ b/usb-control/cp2102_simple.py
@@ -43,8 +43,8 @@ def do_status(dev):
resetstate = cp210x_controller.get_gpio(dev, GPIO_RESET)
bootmode = cp210x_controller.get_gpio(dev, GPIO_MASKROM)
print("Board is {} ({})".format(
- ("running" if reset == RESETSTATE_DEASSERTED else "in reset"),
- ("normal boot" if bootmode == VALUE_MASKROM_DEASSERTED else "boot to maskrom")))
+ ("running" if resetstate == VALUE_RESET_DEASSERT else "in reset"),
+ ("normal boot" if bootmode == VALUE_MASKROM_DEASSERT else "boot to maskrom")))
def do_reset_assert(dev):