Skip to content

Commit 0851a2e

Browse files
jaenrig-ifxactions-user
authored andcommitted
tests/ports/psoc6: Fixed ruff code format rules.
Signed-off-by: enriquezgarc <[email protected]>
1 parent 79f4953 commit 0851a2e

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

tests/ports/psoc6/board_ext_hw/multi/i2s_rx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def rx_complete_irq(obj):
192192
###############################################################################
193193
print("\n3. shift ")
194194

195-
buf = bytearray(b"\xFF\xFF\xFF\xFF")
195+
buf = bytearray(b"\xff\xff\xff\xff")
196196
I2S.shift(buf=buf, bits=16, shift=3)
197197
print(binascii.hexlify(buf))
198198
I2S.shift(buf=buf, bits=16, shift=-3)

tests/ports/psoc6/board_ext_hw/single/adc.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
### ADC Functional test
2-
""" Setup description:
3-
Construct a basic voltage divider with 120 ohms each resistor. Supply the ends with 3.3V and GND.
4-
Available voltage values are then - 3.3V, ~1.7V, 0V.
5-
Pin connections:
6-
Voltage Divider circuit On Target Board
7-
3.3V end adc_pin_max
8-
Mid point adc_pin_mid
9-
GND end adc_pin_gnd
10-
*Known issue: When connected to GND, you may not get exact 0V and this may vary board to board.
2+
3+
"""Setup description:
4+
Construct a basic voltage divider with 120 ohms each resistor. Supply the ends with 3.3V and GND.
5+
Available voltage values are then - 3.3V, ~1.7V, 0V.
6+
Pin connections:
7+
Voltage Divider circuit On Target Board
8+
3.3V end adc_pin_max
9+
Mid point adc_pin_mid
10+
GND end adc_pin_gnd
11+
*Known issue: When connected to GND, you may not get exact 0V and this may vary board to board.
1112
"""
13+
1214
import os
1315
import time
1416
from machine import ADC, ADCBlock

tests/ports/psoc6/board_ext_hw/single/i2c.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ def i2c_tests(i2c_master):
112112
i2c_slave_rcv_buf = bytearray(8)
113113
i2c_slave.conf_receive_buffer(i2c_slave_rcv_buf)
114114

115-
master_write_data = [b"\x01\x44\x55\x23", b"\x98\x03\x44\xEE"]
115+
master_write_data = [b"\x01\x44\x55\x23", b"\x98\x03\x44\xee"]
116116
i2c_master.writevto(slave_addr, master_write_data)
117117

118118
time.sleep_ms(100)
119119

120120
print(
121121
"master writevto() and received by slave: ",
122-
i2c_slave_rcv_buf == b"\x01\x44\x55\x23\x98\x03\x44\xEE",
122+
i2c_slave_rcv_buf == b"\x01\x44\x55\x23\x98\x03\x44\xee",
123123
)
124124

125125
# 4. Master to slave read

tests/ports/psoc6/board_ext_hw/single/pwm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"""
33
Setup: Connect pwm_pin to pin_in
44
"""
5+
56
from machine import PWM, Pin
67
import os
78
import time

0 commit comments

Comments
 (0)