Subversion Repositories shark

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Paolo Gai           <pj@gandalf.sssup.it>
10
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
11
 *   Luca Abeni          <luca@gandalf.sssup.it>
12
 *   (see the web pages for full authors list)
13
 *
14
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
15
 *
16
 * http://www.sssup.it
17
 * http://retis.sssup.it
18
 * http://shark.sssup.it
19
 */
20
 
21
/**
22
 ------------
23
 CVS :        $Id: dma.h,v 1.1.1.1 2002-03-29 14:12:51 pj Exp $
24
 
25
 File:        $File$
26
 Revision:    $Revision: 1.1.1.1 $
27
 Last update: $Date: 2002-03-29 14:12:51 $
28
 ------------
29
 
30
**/
31
 
32
/*
33
 * Copyright (C) 2000 Luca Abeni
34
 *
35
 * This program is free software; you can redistribute it and/or modify
36
 * it under the terms of the GNU General Public License as published by
37
 * the Free Software Foundation; either version 2 of the License, or
38
 * (at your option) any later version.
39
 *
40
 * This program is distributed in the hope that it will be useful,
41
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
42
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43
 * GNU General Public License for more details.
44
 *
45
 * You should have received a copy of the GNU General Public License
46
 * along with this program; if not, write to the Free Software
47
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
48
 *
49
 */
50
 
51
#ifndef __DRIVERS_DMA_H__
52
#define __DRIVERS_DMA_H__
53
 
54
typedef struct dma_buff{
55
    BYTE *p;
56
    DWORD len;
57
    DWORD count;
58
    BYTE page;
59
    BYTE *dma_buff;
60
    WORD dma_bufflen;
61
} DMA_BUFF;
62
 
63
BYTE *dma_getpage(DWORD dim);
64
 
65
void dma_start(BYTE channel);
66
void dma_setmode(BYTE channel, BYTE mode);
67
void dma_setbuff(BYTE channel, BYTE *addr, WORD len);
68
void dma_reset(void);
69
void dma16_start(BYTE channel);
70
void dma16_setmode(BYTE channel, BYTE mode);
71
void dma16_setbuff(BYTE channel, BYTE *addr, WORD len);
72
void dma16_reset(void);
73
 
74
void dma_getalignbuff(struct dma_buff *buff, WORD len);
75
void dma_out(BYTE channel, struct dma_buff *b);
76
void dma_in(BYTE channel, struct dma_buff *b);
77
void dma_stop(BYTE channel);
78
void dma16_out(BYTE channel, struct dma_buff *b);
79
void dma16_in(BYTE channel, struct dma_buff *b);
80
void dma16_stop(BYTE channel);
81
 
82
int infun(struct dma_buff *b);
83
int outfun(struct dma_buff *b);
84
 
85
#endif