aboutsummaryrefslogtreecommitdiffstats
path: root/src/atsam/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atsam/gpio.c')
-rw-r--r--src/atsam/gpio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/atsam/gpio.c b/src/atsam/gpio.c
index 2af2bfc0..f3ad95ac 100644
--- a/src/atsam/gpio.c
+++ b/src/atsam/gpio.c
@@ -60,6 +60,9 @@ set_pull_up(Pio *regs, uint32_t bit, int32_t pull_up)
regs->PIO_PUDR = bit;
regs->PIO_PPDDR = bit;
}
+ // Check if this pin is a "system IO pin" and disable if so
+ if (regs == PIOB && (bit & 0x1cf0))
+ MATRIX->CCFG_SYSIO |= bit;
#endif
}