Subversion Repositories shark

Rev

Rev 3 | 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
 ------------
80 pj 23
 CVS :        $Id: dma.h,v 1.2 2003-03-13 13:38:28 pj Exp $
2 pj 24
 
25
 File:        $File$
80 pj 26
 Revision:    $Revision: 1.2 $
27
 Last update: $Date: 2003-03-13 13:38:28 $
2 pj 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
 
80 pj 54
#include "ll/sys/cdefs.h"
55
 
56
__BEGIN_DECLS
57
 
2 pj 58
typedef struct dma_buff{
59
    BYTE *p;
60
    DWORD len;
61
    DWORD count;
62
    BYTE page;
63
    BYTE *dma_buff;
64
    WORD dma_bufflen;
65
} DMA_BUFF;
66
 
67
BYTE *dma_getpage(DWORD dim);
68
 
69
void dma_start(BYTE channel);
70
void dma_setmode(BYTE channel, BYTE mode);
71
void dma_setbuff(BYTE channel, BYTE *addr, WORD len);
72
void dma_reset(void);
73
void dma16_start(BYTE channel);
74
void dma16_setmode(BYTE channel, BYTE mode);
75
void dma16_setbuff(BYTE channel, BYTE *addr, WORD len);
76
void dma16_reset(void);
77
 
78
void dma_getalignbuff(struct dma_buff *buff, WORD len);
79
void dma_out(BYTE channel, struct dma_buff *b);
80
void dma_in(BYTE channel, struct dma_buff *b);
81
void dma_stop(BYTE channel);
82
void dma16_out(BYTE channel, struct dma_buff *b);
83
void dma16_in(BYTE channel, struct dma_buff *b);
84
void dma16_stop(BYTE channel);
85
 
86
int infun(struct dma_buff *b);
87
int outfun(struct dma_buff *b);
88
 
80 pj 89
__END_DECLS
2 pj 90
#endif