aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>2023-06-29 15:30:26 +0200
committerQuentin Schulz <quentin.schulz@theobroma-systems.com>2023-08-04 13:33:31 +0200
commit39301aa70dcda00539fe282cddc7e6e577a68321 (patch)
treeab9033b46f468f1cd713ebd7e2c45eb4e5b5fdfd
parent51cad40533a93ce62747caf30f136e8257aa44eb (diff)
usb-control: fix flake8 E251 unexpected spaces around keyword / parameter equals
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
-rw-r--r--usb-control/cp210x_controller.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/usb-control/cp210x_controller.py b/usb-control/cp210x_controller.py
index beeda8d..74beeb6 100644
--- a/usb-control/cp210x_controller.py
+++ b/usb-control/cp210x_controller.py
@@ -26,27 +26,27 @@ def set_gpio(dev, gpio, value):
# the latch register has 16 bit. the upper 8 bits are the gpio value,
# the lower 8 bit are the write mask.
val = (value << (8 + gpio)) | (1 << gpio);
- dev.ctrl_transfer(bmRequestType = REQTYPE_HOST_TO_DEVICE,
- bRequest = CP210X_VENDOR_SPECIFIC,
- wValue = CP210X_WRITE_LATCH,
- wIndex = val)
+ dev.ctrl_transfer(bmRequestType=REQTYPE_HOST_TO_DEVICE,
+ bRequest=CP210X_VENDOR_SPECIFIC,
+ wValue=CP210X_WRITE_LATCH,
+ wIndex=val)
def get_gpio(dev, gpio):
# Read 1 byte from latch register
- data = dev.ctrl_transfer(bmRequestType = REQTYPE_DEVICE_TO_HOST,
- bRequest = CP210X_VENDOR_SPECIFIC,
- wValue = CP210X_READ_LATCH,
- data_or_wLength = 1)
+ data = dev.ctrl_transfer(bmRequestType=REQTYPE_DEVICE_TO_HOST,
+ bRequest=CP210X_VENDOR_SPECIFIC,
+ wValue=CP210X_READ_LATCH,
+ data_or_wLength=1)
return not not (data[0] & (1 << gpio))
def get_modemstatus(dev):
- data = dev.ctrl_transfer(bmRequestType = REQTYPE_DEVICE_TO_HOST,
- bRequest = CP210X_GET_MDMSTS,
- wValue = 0,
- wIndex = 0,
- data_or_wLength = 1);
+ data = dev.ctrl_transfer(bmRequestType=REQTYPE_DEVICE_TO_HOST,
+ bRequest=CP210X_GET_MDMSTS,
+ wValue=0,
+ wIndex=0,
+ data_or_wLength=1);
# Check CTS line
return ((data[0] >> 4) & 1)