OpenCBM
unlisten.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 1999-2004 Michael Klein <michael(dot)klein(at)puffin(dot)lb(dot)shuttle(dot)de>
8  * Copyright 2001-2004 Spiro Trikaliotis
9  *
10  */
11 
22 #include <wdm.h>
23 #include "cbm_driver.h"
24 #include "i_iec.h"
25 
37 NTSTATUS
38 cbmiec_unlisten(IN PDEVICE_EXTENSION Pdx)
39 {
40  NTSTATUS ntStatus;
41  ULONG sent;
42  UCHAR buffer;
43 
44  FUNC_ENTER();
45 
46  // send a 0x3F (unlisten) under control of ATN
47 
48  buffer = 0x3f;
49  ntStatus = cbmiec_i_raw_write(Pdx, &buffer, 1, &sent, 1, 0);
50 
51  Pdx->DoNotReleaseBus = FALSE;
52 
53  FUNC_LEAVE_NTSTATUS(ntStatus);
54 }
NTSTATUS cbmiec_i_raw_write(PDEVICE_EXTENSION Pdx, const UCHAR *buf, ULONG cnt, ULONG *pSent, BOOLEAN atn, BOOLEAN talk)
Write some bytes to the IEC bus.
Definition: i_rawwrite.c:54
Internal functions and definitions of the libiec library.
#define FUNC_ENTER()
Definition: debug.h:347
Definitions for the opencbm driver.
NTSTATUS cbmiec_unlisten(IN PDEVICE_EXTENSION Pdx)
Send an UNLISTEN over the IEC bus.
Definition: unlisten.c:38