Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

io.h

00001 #include <sys/ioctl.h>
00002 #include <stdio.h>
00003 #include <unistd.h>
00004 #include <fcntl.h>
00005 #include <errno.h>
00006 
00007 /*
00008 #define SET_SIO0        SIOWritePort(SIOReadPort() | 0x01)
00009 #define SET_SIO1        SIOWritePort(SIOReadPort() | 0x02)
00010 #define SET_SIO2        SIOWritePort(SIOReadPort() | 0x04)
00011 #define SET_SIO3        SIOWritePort(SIOReadPort() | 0x08)
00012 #define SET_SIO4        SIOWritePort(SIOReadPort() | 0x10)
00013 #define SET_SIO5        SIOWritePort(SIOReadPort() | 0x20)
00014 #define SET_SIO6        SIOWritePort(SIOReadPort() | 0x40)
00015 #define SET_SIO7        SIOWritePort(SIOReadPort() | 0x80)
00016 #define RESET_SIO0      SIOWritePort(SIOReadPort() & 0xfe)
00017 #define RESET_SIO1      SIOWritePort(SIOReadPort() & 0xfd)
00018 #define RESET_SIO2      SIOWritePort(SIOReadPort() & 0xfb)
00019 #define RESET_SIO3      SIOWritePort(SIOReadPort() & 0xf7)
00020 #define RESET_SIO4      SIOWritePort(SIOReadPort() & 0xef)
00021 #define RESET_SIO5      SIOWritePort(SIOReadPort() & 0xdf)
00022 #define RESET_SIO6      SIOWritePort(SIOReadPort() & 0xbf)
00023 #define RESET_SIO7      SIOWritePort(SIOReadPort() & 0x7f)
00024 #define READ_SIO0       ((SIOReadPort() & 0x01) >> 0)
00025 #define READ_SIO1       ((SIOReadPort() & 0x02) >> 1)
00026 #define READ_SIO2       ((SIOReadPort() & 0x04) >> 2)
00027 #define READ_SIO3       ((SIOReadPort() & 0x08) >> 3)
00028 #define READ_SIO4       ((SIOReadPort() & 0x10) >> 4)
00029 #define READ_SIO5       ((SIOReadPort() & 0x20) >> 5)
00030 #define READ_SIO6       ((SIOReadPort() & 0x40) >> 6)
00031 #define READ_SIO7       ((SIOReadPort() & 0x80) >> 7)
00032 */
00033 
00034 //SIO control
00035 extern int SIOInit(unsigned char);
00036 extern int SIOWritePort(unsigned char);
00037 extern int SIOReadPort(void);
00038 extern int SIOSetPin(unsigned char);
00039 extern int SIOResetPin(unsigned char);
00040 extern int SIOReadPin(unsigned char);
00041 
00042 //EIO control
00043 extern int EIOInit(unsigned int);
00044 extern int EIOWritePort(unsigned int);
00045 extern int EIOReadPort(void);
00046 extern int EIOSetPin(unsigned char);
00047 extern int EIOResetPin(unsigned char);

Generated on Mon Aug 9 13:41:44 2004 for Glacsweb by doxygen 1.3.5