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

poll.c

Go to the documentation of this file.
00001 /*
00002  *  This program is free software; you can redistribute it and/or
00003  *  modify it under the terms of the GNU General Public License
00004  *  as published by the Free Software Foundation; either version
00005  *  2 of the License, or (at your option) any later version.
00006  *
00007  *  Copyright 1999-2004 Michael Klein <michael(dot)klein(at)puffin(dot)lb(dot)shuttle(dot)de>
00008  *  Copyright 2001-2004 Spiro Trikaliotis
00009  *
00010  */
00011 
00023 #include <wdm.h>
00024 #include "cbm_driver.h"
00025 #include "i_iec.h"
00026 
00039 NTSTATUS
00040 cbmiec_iec_poll(IN PDEVICE_EXTENSION Pdx, OUT PUCHAR Result)
00041 {
00042     UCHAR ch;
00043 
00044     FUNC_ENTER();
00045 
00046     ch = READ_PORT_UCHAR(IN_PORT);
00047 
00048     *Result = 0;
00049 
00050     if((ch & PP_DATA_IN) == 0) *Result |= IEC_LINE_DATA;
00051     if((ch & PP_CLK_IN)  == 0) *Result |= IEC_LINE_CLOCK;
00052     if((ch & PP_ATN_IN)  == 0) *Result |= IEC_LINE_ATN;
00053     if((ch & PP_RESET_IN)== 0) *Result |= IEC_LINE_RESET;
00054 
00055     FUNC_LEAVE_NTSTATUS_CONST(STATUS_SUCCESS);
00056 }

Generated on Sun Apr 30 18:45:56 2006 for opencbm by  doxygen 1.4.2