25 #define TO_HANDSHAKED_READ libiec_global_timeouts.T_PARALLEL_BURST_READ_BYTE_HANDSHAKED
26 #define TO_HANDSHAKED_WRITE libiec_global_timeouts.T_PARALLEL_BURST_WRITE_BYTE_HANDSHAKED
32 #define PERF_EVENT_PARBURST_PAR_READ_ENTER() PERF_EVENT(0x5000, 0)
33 #define PERF_EVENT_PARBURST_PAR_READ_DELAY1(_x_) PERF_EVENT(0x5001, _x_)
34 #define PERF_EVENT_PARBURST_PAR_READ_PP_READ() PERF_EVENT(0x5002, 0)
35 #define PERF_EVENT_PARBURST_PAR_READ_RELEASED(_x_) PERF_EVENT(0x5003, _x_)
36 #define PERF_EVENT_PARBURST_PAR_READ_DELAY2(_x_) PERF_EVENT(0x5004, _x_)
37 #define PERF_EVENT_PARBURST_PAR_READ_TIMEOUT(_x_) PERF_EVENT(0x5005, _x_)
38 #define PERF_EVENT_PARBURST_PAR_READ_EXIT(_x_) PERF_EVENT(0x5006, _x_)
40 #define PERF_EVENT_PARBURST_PAR_WRITE_ENTER() PERF_EVENT(0x5100, 0)
41 #define PERF_EVENT_PARBURST_PAR_WRITE_DELAY1(_x_) PERF_EVENT(0x5101, _x_)
42 #define PERF_EVENT_PARBURST_PAR_WRITE_PP_WRITE(_x_) PERF_EVENT(0x5102, _x_)
43 #define PERF_EVENT_PARBURST_PAR_WRITE_RELEASE() PERF_EVENT(0x5103, 0)
44 #define PERF_EVENT_PARBURST_PAR_WRITE_DELAY2(_x_) PERF_EVENT(0x5104, _x_)
45 #define PERF_EVENT_PARBURST_PAR_WRITE_DUMMY_READ(_x_) PERF_EVENT(0x5105, _x_)
47 #define PERF_EVENT_PARBURST_SEND_CMD(_x_) PERF_EVENT(0x5200, _x_)
49 #define PERF_EVENT_PARBURST_NREAD_RELEASE() PERF_EVENT(0x5300, 0)
50 #define PERF_EVENT_PARBURST_NREAD_AFTERDELAY() PERF_EVENT(0x5301, 0)
51 #define PERF_EVENT_PARBURST_NREAD_EXIT(_x_) PERF_EVENT(0x5302, _x_)
53 #define PERF_EVENT_PARBURST_NWRITE_RELEASE() PERF_EVENT(0x5400, 0)
54 #define PERF_EVENT_PARBURST_NWRITE_VALUE(_x_) PERF_EVENT(0x5401, _x_)
55 #define PERF_EVENT_PARBURST_NWRITE_EXIT(_x_) PERF_EVENT(0x5402, _x_)
57 #define PERF_EVENT_PARBURST_READ_TRACK_ENTER() PERF_EVENT(0x5500, 0)
58 #define PERF_EVENT_PARBURST_READ_TRACK_STARTLOOP() PERF_EVENT(0x5500, 0)
59 #define PERF_EVENT_PARBURST_READ_TRACK_VALUE(_x_) PERF_EVENT(0x5500, _x_)
60 #define PERF_EVENT_PARBURST_READ_TRACK_TIMEOUT(_x_) PERF_EVENT(0x5500, _x_)
61 #define PERF_EVENT_PARBURST_READ_TRACK_READ_DUMMY(_x_) PERF_EVENT(0x5500, _x_)
62 #define PERF_EVENT_PARBURST_READ_TRACK_EXIT(_x_) PERF_EVENT(0x5500, _x_)
64 #define PERF_EVENT_PARBURST_WRITE_TRACK_ENTER() PERF_EVENT(0x5500, 0)
65 #define PERF_EVENT_PARBURST_WRITE_TRACK_STARTLOOP() PERF_EVENT(0x5500, 0)
66 #define PERF_EVENT_PARBURST_WRITE_TRACK_VALUE(_x_) PERF_EVENT(0x5500, _x_)
67 #define PERF_EVENT_PARBURST_WRITE_TRACK_TIMEOUT(_x_) PERF_EVENT(0x5500, _x_)
68 #define PERF_EVENT_PARBURST_WRITE_TRACK_EXIT(_x_) PERF_EVENT(0x5500, _x_)
97 FUNC_LEAVE_NTSTATUS_CONST(STATUS_TIMEOUT);
117 FUNC_LEAVE_NTSTATUS_CONST(STATUS_TIMEOUT);
122 FUNC_LEAVE_NTSTATUS_CONST(STATUS_SUCCESS);
153 FUNC_LEAVE_NTSTATUS_CONST(STATUS_TIMEOUT);
170 FUNC_LEAVE_NTSTATUS_CONST(STATUS_TIMEOUT);
178 FUNC_LEAVE_NTSTATUS_CONST(STATUS_SUCCESS);
190 cbm_handshaked_read(PDEVICE_EXTENSION Pdx,
int Toggle)
246 cbm_handshaked_write(PDEVICE_EXTENSION Pdx,
char Data,
int Toggle)
290 #define enable() cbmiec_release_irq(Pdx)
291 #define disable() cbmiec_block_irq(Pdx)
321 for (i = 0; i < ReturnLength; i ++)
323 byte = cbm_handshaked_read(Pdx, i&1);
331 Buffer[i] = (UCHAR) byte;
345 ntStatus = STATUS_SUCCESS;
352 ntStatus = STATUS_DATA_ERROR;
357 FUNC_LEAVE_NTSTATUS(ntStatus);
388 for (i = 0; i < ReturnLength; i ++)
390 byte = cbm_handshaked_read(Pdx, i&1);
398 Buffer[i] = (UCHAR) byte;
399 if (byte == 0x55)
break;
413 ntStatus = STATUS_SUCCESS;
420 ntStatus = STATUS_DATA_ERROR;
425 FUNC_LEAVE_NTSTATUS(ntStatus);
429 cbmiec_parallel_burst_write_track(IN PDEVICE_EXTENSION Pdx, IN UCHAR* Buffer, IN ULONG BufferLength)
446 for (i = 0; i < BufferLength; i++)
449 if(cbm_handshaked_write(Pdx, Buffer[i], i&1))
465 cbm_handshaked_write(Pdx, 0, i&1);
468 ntStatus = STATUS_SUCCESS;
475 ntStatus = STATUS_DATA_ERROR;
480 FUNC_LEAVE_NTSTATUS(ntStatus);
VOID cbmiec_udelay(IN ULONG howlong)
Wait for a timeout.
#define PERF_EVENT_PARBURST_PAR_WRITE_DELAY1(_x_)
#define PERF_EVENT_PARBURST_READ_TRACK_READ_DUMMY(_x_)
#define CBMIEC_GET(_line)
#define PP_ATN_OUT
The ATN OUT bit.
#define TO_HANDSHAKED_READ
#define PERF_EVENT_PARBURST_NWRITE_EXIT(_x_)
#define PP_DATA_OUT
The DATA OUT bit.
#define PERF_EVENT_PARBURST_PAR_READ_DELAY2(_x_)
#define FUNC_LEAVE_INT(_xxx)
#define PP_CLK_IN
The CLOCK IN bit.
#define PERF_EVENT_PARBURST_PAR_READ_EXIT(_x_)
#define PERF_EVENT_PARBURST_PAR_READ_PP_READ()
NTSTATUS cbmiec_parallel_burst_read_track_var(IN PDEVICE_EXTENSION Pdx, OUT UCHAR *Buffer, IN ULONG ReturnLength)
@@@
#define PERF_EVENT_PARBURST_NWRITE_VALUE(_x_)
#define PERF_EVENT_PARBURST_WRITE_TRACK_EXIT(_x_)
NTSTATUS cbmiec_parallel_burst_read(IN PDEVICE_EXTENSION Pdx, OUT UCHAR *Byte)
@@@
NTSTATUS cbmiec_parallel_burst_write(IN PDEVICE_EXTENSION Pdx, IN UCHAR Byte)
@@@
#define PERF_EVENT_PARBURST_NREAD_AFTERDELAY()
#define TO_HANDSHAKED_WRITE
NTSTATUS cbmiec_parallel_burst_read_track(IN PDEVICE_EXTENSION Pdx, OUT UCHAR *Buffer, IN ULONG ReturnLength)
@@@
BOOLEAN QueueShouldCancelCurrentIrp(PQUEUE Queue)
Should the current IRP be cancelled?
#define PERF_EVENT_PARBURST_READ_TRACK_TIMEOUT(_x_)
Internal functions and definitions of the libiec library.
#define PERF_EVENT_PARBURST_NREAD_RELEASE()
#define PERF_EVENT_PARBURST_PAR_READ_DELAY1(_x_)
#define PERF_EVENT_PARBURST_READ_TRACK_ENTER()
#define PERF_EVENT_PARBURST_PAR_READ_RELEASED(_x_)
#define PP_DATA_IN
The DATA IN bit.
#define PERF_EVENT_PARBURST_PAR_WRITE_ENTER()
#define CBMIEC_RELEASE(_rel)
#define PP_CLK_OUT
The CLOCK OUT bit.
LONG cbmiec_i_pp_read_debounced(IN PDEVICE_EXTENSION Pdx)
Read a byte from the X[M|A]P1541 cable. Make sure to debounce it.
#define PERF_EVENT_PARBURST_WRITE_TRACK_ENTER()
#define PERF_EVENT_PARBURST_PAR_READ_ENTER()
#define PERF_EVENT_PARBURST_WRITE_TRACK_VALUE(_x_)
Definitions for the opencbm driver.
#define PERF_EVENT_PARBURST_WRITE_TRACK_TIMEOUT(_x_)
#define PERF_EVENT_PARBURST_PAR_WRITE_DELAY2(_x_)
#define PERF_EVENT_PARBURST_PAR_READ_TIMEOUT(_x_)
#define PERF_EVENT_PARBURST_NREAD_EXIT(_x_)
#define PERF_EVENT_PARBURST_READ_TRACK_STARTLOOP()
#define PERF_EVENT_PARBURST_WRITE_TRACK_STARTLOOP()
#define PERF_EVENT_PARBURST_NWRITE_RELEASE()
#define PERF_EVENT_PARBURST_READ_TRACK_EXIT(_x_)
#define PERF_EVENT_PARBURST_PAR_WRITE_DUMMY_READ(_x_)
NTSTATUS cbmiec_pp_write(IN PDEVICE_EXTENSION Pdx, IN UCHAR Byte)
Write a byte to the X[M|A]P1541 cable.
#define PERF_EVENT_PARBURST_PAR_WRITE_PP_WRITE(_x_)
#define PERF_EVENT_PARBURST_READ_TRACK_VALUE(_x_)
NTSTATUS cbmiec_pp_read(IN PDEVICE_EXTENSION Pdx, OUT UCHAR *Byte)
Read a byte from the X[M|A]P1541 cable.