/***** dma.h ********************************************************* * (c) 2010 CTA Systems Inc. All rights reserved. Glory To God * * * * Direct Memory Access (DMA) Routines * * =================================== * * * ************************************************************ cta os */ #ifndef __DMA__H__ #define __DMA__H__ enum DMA_MODE_REG_MASK { DMAModeMaskSelect = 3, DMAModeMaskTra = 0xc, DMAModeSelfTest = 0, DMAModeReadTransfer = 4, DMAModeWriteTransfer = 8, DMAModeMaskAuto = 0x10, DMAModeMaskIdec = 0x20, DMAModeMask = 0xc0, DMAModeTransferOnDemand = 0, DMAModeTransferSingle = 0x40, DMAModeTransferBlock = 0x80, DMAModeTransferCascade = 0xC0 }; extern void DMASetAddress(unsigned short channel, unsigned char low, unsigned char high); extern void DMASetCount (unsigned short channel, unsigned char low, unsigned char high); extern void DMASetExternalPageRegisters (unsigned char channel, unsigned char val); extern void DMAMaskChannel (unsigned char channel); extern void DMAUnmaskChannel (unsigned char channel); extern void DMAUnmaskAll(); extern void DMAResetFlipFlop (unsigned char dma); extern void DMAReset (); extern void DMASetMode(unsigned char channel, unsigned char mode); extern void DMASetRead (unsigned char channel); extern void DMASetWrite (unsigned char channel); #endif