summaryrefslogtreecommitdiffstatshomepage
path: root/examples/asmsum.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-02-27 15:36:53 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-28 10:33:03 +1100
commit69661f3343bedf86e514337cff63d96cc42f8859 (patch)
treeaf5dfb380ffdb75dda84828f63cf9d840d992f0f /examples/asmsum.py
parent3f39d18c2b884d32f0443e2e8114ff9d7a14d718 (diff)
downloadmicropython-69661f3343bedf86e514337cff63d96cc42f8859.tar.gz
micropython-69661f3343bedf86e514337cff63d96cc42f8859.zip
all: Reformat C and Python source code with tools/codeformat.py.
This is run with uncrustify 0.70.1, and black 19.10b0.
Diffstat (limited to 'examples/asmsum.py')
-rw-r--r--examples/asmsum.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/asmsum.py b/examples/asmsum.py
index 07e71c7384..f465b25afd 100644
--- a/examples/asmsum.py
+++ b/examples/asmsum.py
@@ -22,6 +22,7 @@ def asm_sum_words(r0, r1):
mov(r0, r2)
+
@micropython.asm_thumb
def asm_sum_bytes(r0, r1):
@@ -46,12 +47,13 @@ def asm_sum_bytes(r0, r1):
mov(r0, r2)
+
import array
-b = array.array('l', (100, 200, 300, 400))
+b = array.array("l", (100, 200, 300, 400))
n = asm_sum_words(len(b), b)
print(b, n)
-b = array.array('b', (10, 20, 30, 40, 50, 60, 70, 80))
+b = array.array("b", (10, 20, 30, 40, 50, 60, 70, 80))
n = asm_sum_bytes(len(b), b)
print(b, n)