Skip to content

Commit

Permalink
tests/psoc6/timer.py: Commented failing test.
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 Feb 7, 2024
1 parent e8ce0c7 commit e6ffce3
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions tests/psoc6/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@

t = Timer(0)
t.init(period=2000, mode=Timer.ONE_SHOT, callback=lambda t: print("Oneshot Timer"))
time.sleep(30)
time.sleep(3)
t.deinit()

# TODO the whole time functionality is not really working...
# def blocking_delay_ms(delay_ms):
# start = time.ticks_ms()
# while time.ticks_diff(time.ticks_ms(), start) < delay_ms:
# pass

def blocking_delay_ms(delay_ms):
start = time.ticks_ms()
while time.ticks_diff(time.ticks_ms(), start) < delay_ms:
pass


t1 = Timer(0)
t1.init(period=2000, mode=Timer.PERIODIC, callback=lambda t: print("Periodic Timer"))
blocking_delay_ms(2000)
t.deinit()
# t1 = Timer(0)
# t1.init(period=2000, mode=Timer.PERIODIC, callback=lambda t: print("Periodic Timer"))
# blocking_delay_ms(2000)
# t.deinit()

0 comments on commit e6ffce3

Please sign in to comment.