- Main Page
- Data Structures
- Files
- Directories

- Search for |

- File List
- Globals

# dma.c File Reference

`#include <sys/dma.h>`
`#include <sys/io.h>`
`#include <ubixos/types.h>`

Include dependency graph for dma.c:

Go to the source code of this file.

## Defines
#define | highByte(x) ((x & 0xFF00) >> 8)
#define | lowByte(x) (x & 0x00FF)
## Functions
void | _dmaXfer (uInt8 dmaChannel, uInt8 page, uInt offset, uInt length, uInt8 mode)
void | dmaXfer (uInt8 channel, uInt32 address, uInt length, uInt8 read)
## Variables
static uInt8 | addrPort [8] = { 0x00, 0x02, 0x04, 0x06, 0xC0, 0xC4, 0xC8, 0xCC }
static uInt8 | clearReg [8] = { 0x0C, 0x0C, 0x0C, 0x0C, 0xD8, 0xD8, 0xD8, 0xD8 }
static uInt8 | countPort [8] = { 0x01, 0x03, 0x05, 0x07, 0xC2, 0xC6, 0xCA, 0xCE }
static uInt8 | maskReg [8] = { 0x0A, 0x0A, 0x0A, 0x0A, 0xD4, 0xD4, 0xD4, 0xD4 }
static uInt8 | modeReg [8] = { 0x0B, 0x0B, 0x0B, 0x0B, 0xD6, 0xD6, 0xD6, 0xD6 }
static uInt8 | pagePort [8] = { 0x87, 0x83, 0x81, 0x82, 0x8F, 0x8B, 0x89, 0x8A }

## Define Documentation

#define highByte | ( | x |  | ) | ((x & 0xFF00) >> 8)

Definition at line 35 of file dma.c.

Referenced by _dmaXfer().

#define lowByte | ( | x |  | ) | (x & 0x00FF)

Definition at line 34 of file dma.c.

Referenced by _dmaXfer().

## Function Documentation

void _dmaXfer | ( | uInt8 | dmaChannel,
|  | uInt8 | page,
|  | uInt | offset,
|  | uInt | length,
|  | uInt8 | mode |
| ) |  |  |

Definition at line 59 of file dma.c.

References addrPort, clearReg, countPort, highByte, lowByte, maskReg, modeReg, outportByte(), and pagePort.

Referenced by dmaXfer().

Here is the call graph for this function:

void dmaXfer | ( | uInt8 | channel,
|  | uInt32 | address,
|  | uInt | length,
|  | uInt8 | read |
| ) |  |  |

Definition at line 44 of file dma.c.

References _dmaXfer().

Referenced by fdcRw().

Here is the call graph for this function:

## Variable Documentation

uInt8 addrPort[8] = { 0x00, 0x02, 0x04, 0x06, 0xC0, 0xC4, 0xC8, 0xCC }`[static]`

Definition at line 40 of file dma.c.

Referenced by _dmaXfer().

uInt8 clearReg[8] = { 0x0C, 0x0C, 0x0C, 0x0C, 0xD8, 0xD8, 0xD8, 0xD8 }`[static]`

Definition at line 38 of file dma.c.

Referenced by _dmaXfer().

uInt8 countPort[8] = { 0x01, 0x03, 0x05, 0x07, 0xC2, 0xC6, 0xCA, 0xCE }`[static]`

Definition at line 42 of file dma.c.

Referenced by _dmaXfer().

uInt8 maskReg[8] = { 0x0A, 0x0A, 0x0A, 0x0A, 0xD4, 0xD4, 0xD4, 0xD4 }`[static]`

Definition at line 37 of file dma.c.

Referenced by _dmaXfer().

uInt8 modeReg[8] = { 0x0B, 0x0B, 0x0B, 0x0B, 0xD6, 0xD6, 0xD6, 0xD6 }`[static]`

Definition at line 39 of file dma.c.

Referenced by _dmaXfer().

uInt8 pagePort[8] = { 0x87, 0x83, 0x81, 0x82, 0x8F, 0x8B, 0x89, 0x8A }`[static]`

Definition at line 41 of file dma.c.

Referenced by _dmaXfer().