We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a042fb commit f7e5e67Copy full SHA for f7e5e67
tests/pyb/modstm.py
@@ -0,0 +1,13 @@
1
+# test stm module
2
+
3
+import stm
4
+import pyb
5
6
+# test storing a full 32-bit number
7
+# turn on then off the A15(=yellow) LED
8
+BSRR = 0x18
9
+stm.mem32[stm.GPIOA + BSRR] = 0x00008000
10
+pyb.delay(100)
11
+print(hex(stm.mem32[stm.GPIOA + stm.GPIO_ODR] & 0x00008000))
12
+stm.mem32[stm.GPIOA + BSRR] = 0x80000000
13
tests/pyb/modstm.py.exp
@@ -0,0 +1,2 @@
+0x8000
+0x0
0 commit comments