nckernel
0.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
x86
include
dma.h
Go to the documentation of this file.
1
17
enum
dma_mode_bit_t
{
18
DMA_MODE_DEMAND
= 0x00,
19
DMA_MODE_SINGLE
= 0x40,
20
DMA_MODE_BLOCK
= 0x80,
21
DMA_MODE_CASCADE
= 0xC0,
22
23
DMA_MODE_ADDR_DEC
= 0x20,
25
DMA_MODE_AUTO_INIT
= 0x10,
26
27
DMA_MODE_TX_VERYFY
= 0x00,
28
DMA_MODE_TX_WRITE
= 0x04,
30
DMA_MODE_TX_READ
= 0x08,
32
DMA_MODE_TX_ILLEGAL
= 0x0C,
33
};
34
35
enum
dma_channel_t
{
36
DMA_CH0
= 0x00,
37
DMA_CH1
= 0x01,
38
DMA_CH2
= 0x02,
39
DMA_CH3
= 0x03,
40
41
DMA_8BIT
= 0x00,
42
DMA_16BIT
= 0x01,
43
44
DMA_MAX_TYPE
= 0x02,
45
DMA_MAX_CHANNEL
= 0x08,
46
};
47
52
enum
dma_mask_bit_t
{
53
/* Set/Clear mask bit 2 */
54
DMA_MASK_DISABLE_CH
= 0x04,
55
};
56
57
struct
dma_port_entry_t
{
58
unsigned
char
page
;
59
unsigned
char
address
;
60
unsigned
char
count
;
61
};
62
63
struct
dma_ctrl_port_entry_t
{
64
unsigned
char
status
;
65
unsigned
char
command
;
66
unsigned
char
request
;
67
unsigned
char
single_mask
;
68
unsigned
char
write_mode
;
69
unsigned
char
byte_ptr
;
70
unsigned
char
intermediate
;
71
unsigned
char
dma_mask
;
72
};
73
83
extern
void
dma_init
(
int
ch,
int
mode,
unsigned
long
address,
int
count);
84
91
extern
int
dma_is_done
(
int
ch);
92
99
extern
struct
dma_ctrl_port_entry_t
*
dma_get_ctrl_port
(
int
type);
100
107
extern
struct
dma_port_entry_t
*
dma_get_port
(
int
channel);
108
Generated on Thu Nov 7 2013 02:45:25 for nckernel by
1.8.4