Skip to content

Commit 6690924

Browse files
Fix: Use realistic static frequencies (100kHz/500kHz) with comments (Fixes #270)
1 parent 836ca4a commit 6690924

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_spi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
CS = "LA3"
3131
SPIMaster._primary_prescaler = PPRE = 0
3232
SPIMaster._secondary_prescaler = SPRE = 0
33-
PWM_FREQUENCY = 1000
33+
# Static value 100kHz used because instance property '_frequency' cannot be accessed on the class.
34+
PWM_FREQUENCY = 100000.0
3435
MICROSECONDS = 1e-6
3536
RELTOL = 0.05
3637
# Number of expected logic level changes.

tests/test_uart.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
WRITE_DATA = 0x55
1717
TXD2 = "LA1"
1818
RXD2 = "SQ1"
19-
PWM_FREQUENCY = 1000
19+
# Static value 500kHz (half of default 1MHz baudrate) used as instance property cannot be accessed here.
20+
PWM_FREQUENCY = 500000.0
2021
MICROSECONDS = 1e-6
2122
RELTOL = 0.05
2223
# Number of expected logic level changes.

0 commit comments

Comments
 (0)