OpenCBM
rawwrite.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 
46 NTSTATUS
47 cbmiec_raw_write(IN PDEVICE_EXTENSION Pdx,
48  IN const PUCHAR Buffer, IN ULONG Size,
49  OUT ULONG *Written)
50 {
51  NTSTATUS ntStatus;
52 
53 #if DBG
54  unsigned i;
55 #endif
56 
57  FUNC_ENTER();
58 
59  PERF_EVENT_VERBOSE(0x1000, 0);
60 
61  FUNC_PARAM((DBG_PREFIX "Buffer = 0x%p, Size = 0x%04x", Buffer, Size));
62 
63 #if DBG
64  for (i=0;i<Size;i++)
65  {
66  FUNC_PARAM((DBG_PREFIX " output %2u: 0x%02x '%c'", i, (unsigned int) Buffer[i], (UCHAR) Buffer[i]));
67  }
68 #endif
69 
70  PERF_EVENT_VERBOSE(0x1001, 0);
71 
72  ntStatus = cbmiec_i_raw_write(Pdx, Buffer, Size, Written, 0, 0);
73 
74  PERF_EVENT_VERBOSE(0x1002, 0);
75 
76  FUNC_LEAVE_NTSTATUS(ntStatus);
77 }
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
#define FUNC_PARAM(_xxx)
Definition: debug.h:351
Definitions for the opencbm driver.
#define DBG_PREFIX
Definition: debug.h:320
NTSTATUS cbmiec_raw_write(IN PDEVICE_EXTENSION Pdx, IN const PUCHAR Buffer, IN ULONG Size, OUT ULONG *Written)
Write some bytes to the IEC bus.
Definition: rawwrite.c:47