atsam: Allow PB4-PB7,PB10-PB12 to be used as gpio on sam4
A separate "sysio" register must be set in order to use some port B pins on the sam4 mcu. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
6f5f2a3bc7
commit
f723a3141e
|
@ -60,6 +60,9 @@ set_pull_up(Pio *regs, uint32_t bit, int32_t pull_up)
|
||||||
regs->PIO_PUDR = bit;
|
regs->PIO_PUDR = bit;
|
||||||
regs->PIO_PPDDR = 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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue