diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-07 23:27:45 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-07 23:27:45 +0100 |
commit | d509ac25f9f387c5690126c49893d3da142971c2 (patch) | |
tree | 73c188e7ae137e28740d28d42cfdcbc939cc4df4 /tests/pybnative/while.py | |
parent | be6aa53cdb18359e5c7e51caac2ca0ea7160962d (diff) |
py: Fix stack access in thumb native emitter.
Diffstat (limited to 'tests/pybnative/while.py')
-rw-r--r-- | tests/pybnative/while.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/pybnative/while.py b/tests/pybnative/while.py index a3f64a800..3ea7221ea 100644 --- a/tests/pybnative/while.py +++ b/tests/pybnative/while.py @@ -1,14 +1,15 @@ +import pyb + @micropython.native -def f(led, n): +def f(led, n, d): led.off() i = 0 while i < n: + print(i) led.toggle() - d = pyb.delay - d(50) # pyb.delay(50) doesn't work! + pyb.delay(d) i += 1 - print(i) led.off() -f(pyb.LED(1), 2) -f(pyb.LED(2), 4) +f(pyb.LED(1), 2, 150) +f(pyb.LED(2), 4, 50) |