Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
/*****************************************************************************
2
* Filename:    Dio.h                                                         *
3
* Author:      Ziglioli Marco                                                *
4
* Date:        16/03/2001                                                    *
5
* Last update:                                                               *
6
* Description: Header file for routines used to configure and use the digital*
7
*              IO lines of PCI6025E NI board                                 *
8
*----------------------------------------------------------------------------*
9
* Notes:       At this time only the eight digital IO lines are programmed   *
10
*              In the future also the 24 lines of 8255 will be programmed    *
11
*****************************************************************************/
12
 
13
/* This file is part of the S.Ha.R.K. Project - http://shark.sssup.it
14
 *
15
 * Copyright (C) 2001 Marco Ziglioli
16
 *
17
 * This program is free software; you can redistribute it and/or modify
18
 * it under the terms of the GNU General Public License as published by
19
 * the Free Software Foundation; either version 2 of the License, or
20
 * (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
30
 *
31
 */
32
 
33
#ifndef _MY_DIO_H_
34
#define _MY_DIO_H_
35
 
36
#include <drivers/pci6025e/pci6025e.h>
37
 
38
#define ALL_IN          0x0000      //All 8 STC line in input
39
#define ALL_OUT         0x00FF      //All 8 STC line in output
40
 
41
#define DIO_setup(b)    config(b)   //ALIAS
42
 
43
#ifndef FALSE
44
#define FALSE           0
45
#endif
46
 
47
#ifndef TRUE
48
#define TRUE            1
49
#endif
50
 
51
void  config(BYTE b);
52
 
53
void  DIO_init(void);
54
void  DIO_resetReg(void);
55
void  DIO_config(BYTE);
56
BYTE  DIO_read(void);
57
BYTE  DIO_write(BYTE b);
58
WORD  DIO_setConfig(char *);
59
WORD  DIO_getConfig(void);
60
 
61
void  PPI_init(void);
62
void  PPI_resetReg(void);
63
void  PPI_config(BYTE);
64
BYTE  PPI_read(BYTE);
65
void  PPI_write(BYTE, BYTE);
66
WORD  PPI_setConfig(BYTE, BYTE, BYTE, BYTE, BYTE, BYTE);
67
WORD  PPI_getConfig(BYTE);
68
BYTE  PPI_getAddress(BYTE);
69
#endif
70
/*--------------------------------------------------------------------------*/