MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / SetDmaCount

Function SetDmaCount

bsp/x86/drivers/dma.h:165–175  ·  view source on GitHub ↗

* 设定DMA 传输块数 */

Source from the content-addressed store, hash-verified

163 * 设定DMA 传输块数
164 */
165static __inline__ void SetDmaCount(unsigned int dmanr, unsigned int count)
166{
167 count--;
168 if (dmanr <= 3) {
169 OUTB( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
170 OUTB( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
171 } else {
172 OUTB( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
173 OUTB( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
174 }
175}
176
177
178/*

Callers 1

floppy_setupDMAFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected