DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
src/hardware/parport/directlpt_win32.h
00001 /*
00002  *  Copyright (C) 2002-2013  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
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018 
00019 // include guard
00020 #ifndef DOSBOX_DIRECTLPT_WIN32_H
00021 #define DOSBOX_DIRECTLPT_WIN32_H
00022 
00023 #include "config.h"
00024 #include "setup.h"
00025 
00026 #if C_DIRECTLPT
00027 #ifdef WIN32
00028 
00029 
00030 
00031 #define DIRECTLPT_AVAILIBLE
00032 #include "parport.h"
00033 //#include <windows.h>
00034 
00035 
00036 class CDirectLPT : public CParallel {
00037 public:
00038         //HANDLE driverHandle;
00039         Bit32u realbaseaddress;
00040         Bit8u originalECPControlReg;
00041         
00042         CDirectLPT(
00043                         Bitu nr,
00044                         Bit8u initIrq,
00045                         CommandLine* cmd
00046             );
00047         
00048 
00049         ~CDirectLPT();
00050         
00051         bool interruptflag;
00052         bool isECP;
00053         bool InstallationSuccessful;    // check after constructing. If
00054                                                                         // something was wrong, delete it right away.
00055         bool ack_polarity;
00056 
00057         Bitu Read_PR();
00058         Bitu Read_COM();
00059         Bitu Read_SR();
00060 
00061         void Write_PR(Bitu);
00062         void Write_CON(Bitu);
00063         void Write_IOSEL(Bitu);
00064         bool Putchar(Bit8u);
00065 
00066         void handleUpperEvent(Bit16u type);
00067 };
00068 
00069 #endif  // WIN32
00070 #endif  // C_DIRECTLPT
00071 #endif  // include guard