diff --git a/tests/psoc6/adc.py b/tests/psoc6/adc.py index a78e11875ec85..46e4c5ab7c4a1 100644 --- a/tests/psoc6/adc.py +++ b/tests/psoc6/adc.py @@ -7,17 +7,14 @@ adc_pin = Pin("P10_0") adc_wrong_pin = Pin("P13_7") -adc = ADC(adc_pin) -print(adc) - -adc = ADC(adc_pin, sample_ns=1200) -print(adc) - -print(adc.read_uv() > 0) -print(adc.read_u16() > 0) - # Exceptions should be raised try: adc = ADC(adc_wrong_pin) except: print("Invalid ADC Pin") + +adc = ADC(adc_pin, sample_ns=1000) +print(adc) + +print(adc.read_u16() > 0) +print(adc.read_uv() > 0) diff --git a/tests/psoc6/adc.py.exp b/tests/psoc6/adc.py.exp index a4d8ce296edb3..7871f4ccc6022 100644 --- a/tests/psoc6/adc.py.exp +++ b/tests/psoc6/adc.py.exp @@ -1,5 +1,4 @@ +Invalid ADC Pin - -False True -Invalid ADC Pin +True diff --git a/tests/psoc6/adcblock.py.exp b/tests/psoc6/adcblock.py.exp index 1d474b83f7aba..dcb8531e876d4 100644 --- a/tests/psoc6/adcblock.py.exp +++ b/tests/psoc6/adcblock.py.exp @@ -1,4 +1,4 @@ TypeError: Specified ADC id not supported. Currently only block 0 is configured! TypeError: Invalid bits. Current ADC configuration supports only 12 bits resolution! TypeError: Wrong pin specified for the mentioned channel -False +True