Skip to content

Commit

Permalink
tests/psoc6/dut/signal: Removed unsupported signal.value() from test.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
  • Loading branch information
jaenrig-ifx authored and actions-user committed Jan 26, 2024
1 parent b200b3f commit a7335af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
13 changes: 4 additions & 9 deletions tests/psoc6/dut/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# Pin out and pin in must be connected
# together in the board

# value() as get is not supported,
# same as undefined for pin.value() for output

pin_out = Pin(pin1_name, mode=Pin.OUT, value=True)
pin_in = Pin(pin2_name, Pin.IN)

Expand All @@ -25,19 +28,15 @@

signal.on()
print("signal is high when on(): ", pin_in.value() == 1)
print("signal is active when on(): ", signal.value() == True)

signal.value(0)
print("signal is high when value(0): ", pin_in.value() == 0)
print("signal is inactive when value(0): ", signal.value() == False)
print("signal is low when value(0): ", pin_in.value() == 0)

signal.value(1)
print("signal is high when value(1): ", pin_in.value() == 1)
print("signal is active when value(1): ", signal.value() == True)

signal.off()
print("signal is low when off(): ", pin_in.value() == 0)
print("signal is inactive when off(): ", signal.value() == False)

print("\n")

Expand All @@ -47,16 +46,12 @@

signal.on()
print("signal is low when on(): ", pin_in.value() == 0)
print("signal is active when on(): ", signal.value() == True)

signal.value(0)
print("signal is high when value(0): ", pin_in.value() == 1)
print("signal is inactive when value(0): ", signal.value() == False)

signal.value(1)
print("signal is low when value(1): ", pin_in.value() == 0)
print("signal is active when value(1): ", signal.value() == True)

signal.off()
print("signal is high when off(): ", pin_in.value() == 1)
print("signal is inactive when off(): ", signal.value() == False)
12 changes: 2 additions & 10 deletions tests/psoc6/dut/signal.py.exp
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
non-inverted
signal is high when on(): True
signal is active when on(): False
signal is high when value(0): True
signal is inactive when value(0): True
signal is low when value(0): True
signal is high when value(1): True
signal is active when value(1): False
signal is low when off(): True
signal is inactive when off(): True


inverted
signal is low when on(): True
signal is active when on(): True
signal is high when value(0): True
signal is inactive when value(0): False
signal is low when value(1): True
signal is active when value(1): True
signal is high when off(): True
signal is inactive when off(): False
signal is high when off(): True

0 comments on commit a7335af

Please sign in to comment.