DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
src/hardware/parport/directlpt_linux.h
00001 /*
00002  *  Copyright (C) 2002-2020  The DOSBox Team
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License along
00015  *  with this program; if not, write to the Free Software Foundation, Inc.,
00016  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 // include guard
00020 #ifndef DOSBOX_DIRECTLPT_LINUX_H
00021 #define DOSBOX_DIRECTLPT_LINUX_H
00022 
00023 #include "config.h"
00024 
00025 #if C_DIRECTLPT
00026 #ifdef LINUX
00027 
00028 #define DIRECTLPT_AVAILIBLE
00029 #include "parport.h"
00030 
00031 
00032 class CDirectLPT : public CParallel {
00033 public:
00034         CDirectLPT(Bitu nr, Bit8u initIrq, CommandLine* cmd);
00035         
00036 
00037         ~CDirectLPT();
00038 
00039         int porthandle;
00040         
00041         bool interruptflag;
00042         bool InstallationSuccessful;    // check after constructing. If
00043                                                                         // something was wrong, delete it right away.
00044         bool ack_polarity;
00045 
00046         Bitu Read_PR();
00047         Bitu Read_COM();
00048         Bitu Read_SR();
00049 
00050         void Write_PR(Bitu);
00051         void Write_CON(Bitu);
00052         void Write_IOSEL(Bitu);
00053         bool Putchar(Bit8u);
00054 
00055         void handleUpperEvent(Bit16u type);
00056 };
00057 
00058 #endif  // WIN32
00059 #endif  // C_DIRECTLPT
00060 #endif  // include guard