From 3eb9dca695254b9d59f30597ea6c409e1b65e7ee Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Thu, 9 Sep 2021 12:04:43 -0700 Subject: [PATCH] machine: fix copy-paste error for atsamd21/51 calibTrim block Fixes #2097 --- src/machine/machine_atsamd21.go | 2 +- src/machine/machine_atsamd51.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/machine/machine_atsamd21.go b/src/machine/machine_atsamd21.go index 97704584..dce28743 100644 --- a/src/machine/machine_atsamd21.go +++ b/src/machine/machine_atsamd21.go @@ -1958,7 +1958,7 @@ func handlePadCalibration() { sam.USB_DEVICE.PADCAL.SetBits(calibTransP << sam.USB_DEVICE_PADCAL_TRANSP_Pos) if calibTrim == 0x7 { - calibTransN = 3 + calibTrim = 3 } sam.USB_DEVICE.PADCAL.SetBits(calibTrim << sam.USB_DEVICE_PADCAL_TRIM_Pos) } diff --git a/src/machine/machine_atsamd51.go b/src/machine/machine_atsamd51.go index 2e7a6700..4fc5bc62 100644 --- a/src/machine/machine_atsamd51.go +++ b/src/machine/machine_atsamd51.go @@ -2167,7 +2167,7 @@ func handlePadCalibration() { sam.USB_DEVICE.PADCAL.SetBits(calibTransP << sam.USB_DEVICE_PADCAL_TRANSP_Pos) if calibTrim == 0x7 { - calibTransN = 3 + calibTrim = 3 } sam.USB_DEVICE.PADCAL.SetBits(calibTrim << sam.USB_DEVICE_PADCAL_TRIM_Pos) }