Skip to content

Commit

Permalink
tests/psoc6: Fixing ADC tests.
Browse files Browse the repository at this point in the history
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
  • Loading branch information
NikhitaR-IFX committed Jul 31, 2023
1 parent 834c5bd commit 388a5e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/psoc6/adc.py.exp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invalid ADC Pin
<ADC Pin=80, Channel=0, sampling_time_ns=1000>
<ADC Pin=80, ADCBlock_id=0, sampling_time_ns=1000>
True
True
6 changes: 4 additions & 2 deletions tests/psoc6/adcblock.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""
ADCBlock test for the PSoC6 port.
"""
from machine import ADCBlock, Pin
from machine import Pin, ADCBlock

print("ADCBlock tests")

pin = Pin("P10_0")

Expand All @@ -16,7 +18,7 @@
except:
print("TypeError: Invalid bits. Current ADC configuration supports only 12 bits resolution!")

adcBlock = ADCBlock(0, bits=12)
adcBlock = ADCBlock(0)

try:
adcPin = adcBlock.connect(1, pin)
Expand Down

0 comments on commit 388a5e3

Please sign in to comment.