OpenCBM
rawread.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 
48 NTSTATUS cbmiec_raw_read(IN PDEVICE_EXTENSION Pdx,
49  OUT PUCHAR Buffer, IN ULONG Size,
50  OUT ULONG* Read)
51 {
52  NTSTATUS ntStatus;
53 
54 #if DBG
55  USHORT i;
56 #endif
57 
58  FUNC_ENTER();
59 
60  FUNC_PARAM((DBG_PREFIX "Buffer = 0x%p, Size = 0x%04x", Buffer, Size));
61 
62  ntStatus = cbmiec_i_raw_read(Pdx, Buffer, Size, Read);
63 
64 #if DBG
65  for (i=0;i<*Read;i++)
66  {
67  FUNC_PARAM((DBG_PREFIX " input %2u: 0x%02x '%c'", i, (unsigned int) Buffer[i], (UCHAR) Buffer[i]));
68  }
69 #endif
70 
71  FUNC_LEAVE_NTSTATUS(ntStatus);
72 }
Internal functions and definitions of the libiec library.
NTSTATUS cbmiec_raw_read(IN PDEVICE_EXTENSION Pdx, OUT PUCHAR Buffer, IN ULONG Size, OUT ULONG *Read)
Read some bytes from the IEC bus.
Definition: rawread.c:48
NTSTATUS cbmiec_i_raw_read(IN PDEVICE_EXTENSION Pdx, OUT UCHAR *buf, ULONG cnt, OUT ULONG *pReceived)
Read some bytes from the IEC bus.
Definition: i_rawread.c:45
#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