From ca1a28249551277a83d23a467bb724319356263e Mon Sep 17 00:00:00 2001 From: Ethan Reesor Date: Sun, 12 Jul 2020 18:40:37 -0500 Subject: [PATCH] Use runtime/volatile.T.ReplaceBits --- src/machine/machine_atsamd21.go | 2 +- src/machine/machine_atsamd21g18.go | 96 +++++++++++++++--------------- src/machine/machine_atsamd51.go | 2 +- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/machine/machine_atsamd21.go b/src/machine/machine_atsamd21.go index 36967a09..916802e8 100644 --- a/src/machine/machine_atsamd21.go +++ b/src/machine/machine_atsamd21.go @@ -240,7 +240,7 @@ func (p Pin) SetInterrupt(change PinChange, callback func(Pin)) error { addr = &sam.EIC.CONFIG1 } pos := (extint % 8) * 4 // bit position in register - addr.Set((addr.Get() &^ (0xf << pos)) | uint32(change)<