config file support for ECP on or off

This commit is contained in:
themythos
2002-03-03 12:42:42 +00:00
parent 02464aa80f
commit 612023bf17
+8
View File
@@ -52,6 +52,7 @@ static int width;
static int height; static int height;
static int cellwidth; static int cellwidth;
static int cellheight; static int cellheight;
static char bidirectLPT;
// Vars for the server core // Vars for the server core
MODULE_EXPORT char *api_version = API_VERSION; MODULE_EXPORT char *api_version = API_VERSION;
@@ -102,6 +103,7 @@ t6963_init (Driver *drvthis, char *args)
report (RPT_WARNING, "T6963_init: Port value must be between 0x200 and 0x400. Using default value.\n"); report (RPT_WARNING, "T6963_init: Port value must be between 0x200 and 0x400. Using default value.\n");
} }
bidirectLPT = drvthis->config_get_bool ( drvthis->name, "ECPlpt", 0, 0 );
/* ------------------ Get permission to parallel port --------------------------------------------*/ /* ------------------ Get permission to parallel port --------------------------------------------*/
@@ -463,6 +465,8 @@ t6963_low_dsp_ready (void)
{ {
int i = 0; int i = 0;
int input; int input;
if(bidirectLPT == 1) {
T6963_DATAIN; T6963_DATAIN;
do { do {
i++; i++;
@@ -472,6 +476,10 @@ t6963_low_dsp_ready (void)
t6963_low_set_control(1, 0, 1, -1); t6963_low_set_control(1, 0, 1, -1);
} while (i < 50000 && (input & 3)!=3); } while (i < 50000 && (input & 3)!=3);
T6963_DATAOUT; T6963_DATAOUT;
} else {
for(i=0; i<3; i++)
port_out(0x80, 0x00); /* wait 1ms */
}
} }
void void