aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/examples
diff options
context:
space:
mode:
authorKenneth Bell <[email protected]>2021-05-31 17:45:49 -0700
committerRon Evans <[email protected]>2021-06-11 09:07:32 +0200
commit5f9e339cf3cff0d3bdf600cc64fc2245a41a8db1 (patch)
tree7c4ac0656fe32708fd3cd4cedf45d31f15196cc7 /src/examples
parentc017ed224247c1627dcc81dad2d69fb266671678 (diff)
downloadtinygo-5f9e339cf3cff0d3bdf600cc64fc2245a41a8db1.tar.gz
tinygo-5f9e339cf3cff0d3bdf600cc64fc2245a41a8db1.zip
stm32: support pin input interrupts
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/pininterrupt/stm32.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/examples/pininterrupt/stm32.go b/src/examples/pininterrupt/stm32.go
new file mode 100644
index 000000000..30a86313b
--- /dev/null
+++ b/src/examples/pininterrupt/stm32.go
@@ -0,0 +1,10 @@
+// +build stm32
+
+package main
+
+import "machine"
+
+const (
+ buttonMode = machine.PinInputPulldown
+ buttonPinChange = machine.PinRising | machine.PinFalling
+)