Skip to content

Commit bb22968

Browse files
committed
Fix pin change interrupts
1 parent bbdd211 commit bb22968

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// +build wioterminal
2+
3+
package main
4+
5+
import "machine"
6+
7+
const (
8+
buttonMode = machine.PinInput
9+
buttonPinChange = machine.PinFalling
10+
)

src/machine/machine_atsamd51.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,22 @@ func (p Pin) SetInterrupt(change PinChange, callback func(Pin)) error {
376376
extint = 14
377377
case PB29:
378378
extint = 15
379+
case PC07:
380+
extint = 9
381+
case PD08:
382+
extint = 3
383+
case PD09:
384+
extint = 4
385+
case PD10:
386+
extint = 5
387+
case PD11:
388+
extint = 6
389+
case PD12:
390+
extint = 7
391+
case PD20:
392+
extint = 10
393+
case PD21:
394+
extint = 11
379395
default:
380396
// All other pins follow a normal pattern.
381397
extint = uint8(p) % 16

0 commit comments

Comments
 (0)