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

talk.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 
00044 NTSTATUS
00045 cbmiec_talk(IN PDEVICE_EXTENSION Pdx, IN UCHAR Device, IN UCHAR Secaddr)
00046 {
00047     NTSTATUS ntStatus;
00048     ULONG sent;
00049     UCHAR buffer[2];
00050 
00051     FUNC_ENTER();
00052 
00053     FUNC_PARAM((DBG_PREFIX "Device = 0x%02x, Secaddr = 0x%02x", (int)Device, (int)Secaddr));
00054 
00055     // send a 0x4x / 0x6y (talk device x, secaddr y) under control of ATN
00056 
00057     buffer[0] = 0x40 | Device;
00058     buffer[1] = 0x60 | Secaddr;
00059     ntStatus = cbmiec_i_raw_write(Pdx, buffer, 2, &sent, 1, 1);
00060 
00061     Pdx->DoNotReleaseBus = TRUE;
00062 
00063     FUNC_LEAVE_NTSTATUS(ntStatus);
00064 }

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