ReactOS  0.4.14-dev-317-g96040ec
dma.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: GPL - See COPYING in the top level directory
3  * PROJECT: ReactOS Virtual DOS Machine
4  * FILE: subsystems/mvdm/ntvdm/hardware/dma.h
5  * PURPOSE: ISA DMA - Direct Memory Access Controller emulation -
6  * i8237A compatible with 74LS612 Memory Mapper extension
7  * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8  */
9 
10 #ifndef _DMA_H_
11 #define _DMA_H_
12 
13 /* DEFINES ********************************************************************/
14 
15 #define DMA_CONTROLLERS 2
16 #define DMA_CONTROLLER_CHANNELS 4 // Each DMA controller has 4 channels
17 
18 typedef struct _DMA_CHANNEL
19 {
26 
27 typedef struct _DMA_CONTROLLER
28 {
30 
33 
35 
40 
41  BOOLEAN FlipFlop; // 0: LSB ; 1: MSB
42 
44 
45 /* 74LS612 Memory Mapper extension */
46 typedef struct _DMA_PAGE_REGISTER
47 {
50 
51 // The 74LS612 contains 16 bytes, each of them being a page register.
52 // They are accessible via ports 0x80 through 0x8F.
53 
54 /* FUNCTIONS ******************************************************************/
55 
56 DWORD DmaRequest(IN WORD iChannel,
58  IN DWORD length);
59 
61 
62 #endif /* _DMA_H_ */
BYTE Mask
Definition: dma.h:38
#define IN
Definition: typedefs.h:38
BYTE Status
Definition: dma.h:39
WORD BaseAddress
Definition: dma.h:20
struct _DMA_PAGE_REGISTER DMA_PAGE_REGISTER
WORD CurrAddress
Definition: dma.h:22
struct _DMA_CHANNEL DMA_CHANNEL
unsigned char BOOLEAN
Definition: bufpool.h:45
BOOLEAN FlipFlop
Definition: dma.h:41
BYTE TempReg
Definition: dma.h:34
struct _DMA_PAGE_REGISTER * PDMA_PAGE_REGISTER
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
WORD TempElemCnt
Definition: dma.h:32
DWORD DmaRequest(IN WORD iChannel, IN OUT PVOID Buffer, IN DWORD length)
Definition: dma.c:386
#define DMA_CONTROLLER_CHANNELS
Definition: dma.h:16
VOID DmaInitialize(VOID)
Definition: dma.c:549
unsigned char BYTE
Definition: mem.h:68
WORD BaseElemCnt
Definition: dma.h:21
struct _DMA_CONTROLLER DMA_CONTROLLER
#define OUT
Definition: typedefs.h:39
BYTE Command
Definition: dma.h:36
DMA_CHANNEL DmaChannel[DMA_CONTROLLER_CHANNELS]
Definition: dma.h:29
WORD CurrElemCnt
Definition: dma.h:23
WORD TempAddress
Definition: dma.h:31
struct _DMA_CONTROLLER * PDMA_CONTROLLER
BYTE Mode
Definition: dma.h:24
struct _DMA_CHANNEL * PDMA_CHANNEL
BYTE Request
Definition: dma.h:37