Skip to content

Commit

Permalink
tests/psoc6: Modification in test to accept new board.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
  • Loading branch information
jaenrig-ifx committed Oct 18, 2023
1 parent ae0a65b commit 7ada12b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 12 deletions.
5 changes: 2 additions & 3 deletions tests/psoc6/i2c_hard.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
scl_pin = "P6_0"
sda_pin = "P6_1"
elif "CY8CPROTO-063-BLE" in machine:
print("SKIP")
raise SystemExit
scl_pin = "P6_4"
sda_pin = "P6_5"

i2c = I2C(id=0, scl=scl_pin, sda=sda_pin, freq=400000)
print(i2c)

print(i2c.scan())
1 change: 0 additions & 1 deletion tests/psoc6/i2c_hard.py.exp
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
I2C(0, freq=400000, scl=48, sda=49)
[]
5 changes: 2 additions & 3 deletions tests/psoc6/i2c_soft.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
scl_pin = "P6_0"
sda_pin = "P6_1"
elif "CY8CPROTO-063-BLE" in machine:
print("SKIP")
raise SystemExit
scl_pin = "P6_4"
sda_pin = "P6_5"

si2c = SoftI2C(scl=scl_pin, sda=sda_pin, freq=400000)
print(si2c)

print(si2c.scan())
1 change: 0 additions & 1 deletion tests/psoc6/i2c_soft.py.exp
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
SoftI2C(scl=48, sda=49, freq=500000)
[]
3 changes: 1 addition & 2 deletions tests/psoc6/pwm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
if "CY8CPROTO-062-4343W" in machine:
pin_name = "P12_0"
elif "CY8CPROTO-063-BLE" in machine:
print("SKIP")
raise SystemExit
pin_name = "P6_3"

pwm = PWM(pin_name, freq=50, duty_u16=8192, invert=0)
print(pwm)
Expand Down
5 changes: 3 additions & 2 deletions tests/psoc6/spi_soft.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
mosi_pin = "P9_0"
miso_pin = "P9_1"
elif "CY8CPROTO-063-BLE" in machine:
print("SKIP")
raise SystemExit
sck_pin = "P9_2"
mosi_pin = "P9_0"
miso_pin = "P9_1"

spi = SoftSPI(baudrate=100000, polarity=1, phase=0, sck=sck_pin, mosi=mosi_pin, miso=miso_pin)
print(spi)
Expand Down

0 comments on commit 7ada12b

Please sign in to comment.