// Usarts
ioUnits.add(usart0);
ioUnits.add(usart1);
DMA dma = new DMA("dma", cpu, cpu.memory, 0);
cpu.setIORange(0x1e0, 24, dma);
/* DMA Ctl */
cpu.setIORange(0x122, 1, dma);
cpu.setIORange(0x124, 1, dma);
/* configure the DMA */
dma.setDMATrigger(DMA.URXIFG0, usart0, 0);
dma.setDMATrigger(DMA.UTXIFG0, usart0, 1);
dma.setDMATrigger(DMA.URXIFG1, usart1, 0);
dma.setDMATrigger(DMA.UTXIFG1, usart1, 1);
dma.setInterruptMultiplexer(new InterruptMultiplexer(cpu, 0));
ioUnits.add(dma);
// Add port 1,2 with interrupt capability!
// IOPorts will add themselves to the CPU