Bracket SGPIO GPDMA slice configuration with multislice==false test. It only makes sense in single slice mode (until I have a clever idea for doing GPDMA with multiple slices).

This commit is contained in:
Jared Boone
2013-12-08 12:14:00 -08:00
parent 809df425c1
commit 50ec268794

View File

@ -228,6 +228,7 @@ void sgpio_configure(
slice_enable_mask |= (1 << slice_index);
}
if( multi_slice == false ) {
SGPIO_MUX_CFG(slice_gpdma) =
SGPIO_MUX_CFG_CONCAT_ORDER(0) /* Self-loop */
| SGPIO_MUX_CFG_CONCAT_ENABLE(1)
@ -259,6 +260,7 @@ void sgpio_configure(
SGPIO_REG_SS(slice_gpdma) = 0x77777777; // Shadow output data register, LSB -> out1
slice_enable_mask |= (1 << slice_gpdma);
}
// Start SGPIO operation by enabling slice clocks.
SGPIO_CTRL_ENABLE = slice_enable_mask;