mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-23 13:11:22 -05:00
SGPIO: Hi-Z data bus before setting direction pin.
Another tactic to avoid bus contention, however brief.
This commit is contained in:
parent
62d2ae2336
commit
52c089c4df
@ -298,10 +298,12 @@ constexpr P_OUT_CFG data_p_out_cfg(
|
||||
void SGPIO::configure(const Direction direction) {
|
||||
disable_all_slice_counters();
|
||||
|
||||
LPC_SGPIO->GPIO_OUTREG = gpio_outreg(direction);
|
||||
|
||||
// Set data pins as input, temporarily.
|
||||
LPC_SGPIO->GPIO_OENREG = gpio_oenreg(Direction::Receive);
|
||||
|
||||
// Now that data pins are inputs, safe to change CPLD direction.
|
||||
LPC_SGPIO->GPIO_OUTREG = gpio_outreg(direction);
|
||||
|
||||
LPC_SGPIO->OUT_MUX_CFG[ 8] = out_mux_cfg(P_OUT_CFG::DOUT_DOUTM1, P_OE_CFG::GPIO_OE);
|
||||
LPC_SGPIO->OUT_MUX_CFG[ 9] = out_mux_cfg(P_OUT_CFG::DOUT_DOUTM1, P_OE_CFG::GPIO_OE);
|
||||
LPC_SGPIO->OUT_MUX_CFG[10] = out_mux_cfg(P_OUT_CFG::GPIO_OUT, P_OE_CFG::GPIO_OE);
|
||||
|
Loading…
Reference in New Issue
Block a user