diff --git a/src/machine/machine_atsamd21e18.go b/src/machine/machine_atsamd21e18.go index ebfca6b2e..158b3d3ff 100644 --- a/src/machine/machine_atsamd21e18.go +++ b/src/machine/machine_atsamd21e18.go @@ -106,7 +106,7 @@ func (p GPIO) Configure(config GPIOConfig) { } else { // even pin, so save the odd pins val := p.getPMux() & sam.PORT_PMUX0_PMUXO_Msk - p.setPMux(val | (GPIO_COM << sam.PORT_PMUX0_PMUXE_Pos)) + p.setPMux(val | (GPIO_ANALOG << sam.PORT_PMUX0_PMUXE_Pos)) } // enable port config p.setPinCfg(sam.PORT_PINCFG0_PMUXEN | sam.PORT_PINCFG0_DRVSTR) diff --git a/src/machine/machine_atsamd21g18.go b/src/machine/machine_atsamd21g18.go index 7af3f52e4..d278c6d00 100644 --- a/src/machine/machine_atsamd21g18.go +++ b/src/machine/machine_atsamd21g18.go @@ -149,7 +149,7 @@ func (p GPIO) Configure(config GPIOConfig) { } else { // even pin, so save the odd pins val := p.getPMux() & sam.PORT_PMUX0_PMUXO_Msk - p.setPMux(val | (GPIO_COM << sam.PORT_PMUX0_PMUXE_Pos)) + p.setPMux(val | (GPIO_ANALOG << sam.PORT_PMUX0_PMUXE_Pos)) } // enable port config p.setPinCfg(sam.PORT_PINCFG0_PMUXEN | sam.PORT_PINCFG0_DRVSTR)