45 cbmiec_i_raw_read(IN PDEVICE_EXTENSION Pdx, OUT UCHAR *Buffer, ULONG Count, OUT ULONG *Received)
65 if (!NT_SUCCESS(ntStatus))
67 FUNC_LEAVE_NTSTATUS(ntStatus);
74 FUNC_LEAVE_NTSTATUS_CONST(STATUS_END_OF_FILE);
98 FUNC_LEAVE_NTSTATUS_CONST(STATUS_TIMEOUT);
150 for (bit = b = 0; (bit < 8) && ok; bit++)
196 DBG_ERROR((
DBG_PREFIX "BREAKING OUT OF BIT-LOOP, no CLK pulse received. Bit %u, Value = %u", (
unsigned int) bit, (
unsigned int) b));
231 *Buffer++ = (UCHAR) b;
246 }
while(received < Count && ok && !Pdx->Eoi);
252 received, Count, ok, Pdx->Eoi));
255 ntStatus = STATUS_SUCCESS;
260 received, Count, ok, Pdx->Eoi));
264 ntStatus = STATUS_UNEXPECTED_NETWORK_ERROR;
268 *Received = received;
270 FUNC_LEAVE_NTSTATUS(ntStatus);
VOID cbmiec_udelay(IN ULONG howlong)
Wait for a timeout.
ULONG T_1_RECV_WAIT_CLK_LOW_DATA_READY_GRANU
= 20 us: Starting reception, granularity for the wait until CLK is low
IEC_TIMEOUTS libiec_global_timeouts
#define CBMIEC_GET(_line)
#define PP_DATA_OUT
The DATA OUT bit.
NTSTATUS cbmiec_i_raw_read(IN PDEVICE_EXTENSION Pdx, OUT UCHAR *Buffer, ULONG Count, OUT ULONG *Received)
Read some bytes from the IEC bus.
#define PP_CLK_IN
The CLOCK IN bit.
ULONG T_5_Times
x T_5, is 200: How long to wait for CLK high (=active) for every single bit
ULONG T_5_RECV_BIT_WAIT_CLK_HIGH
= 10 us: Granularity: How long to wait for CLK high (=active) for every single bit ...
ULONG T_6_Times
x T_6, is 100: How long to wait for CLK low again (=inactive) after every single bit ...
ULONG T_4_Times
x T_4, is 100: Wait for CLK high after an EOI
BOOLEAN QueueShouldCancelCurrentIrp(PQUEUE Queue)
Should the current IRP be cancelled?
Internal functions and definitions of the libiec library.
ULONG T_4_RECV_WAIT_CLK_HIGH_AFTER_EOI_GRANU
= 20 us: Granularity: Wait for CLK high after an EOI
ULONG T_2_RECV_WAIT_CLK_HIGH_T_NE
= 10 us: Granularity: How long do we wait for the data of the other site
VOID cbmiec_schedule_timeout(IN ULONG howlong)
Schedule a timeout.
ULONG T_7_RECV_INTER_BYTE_DELAY
= 70 us: Inter-byte delay on reception
VOID cbmiec_setcablestate(PDEVICE_EXTENSION Pdx, CABLESTATE State)
Set the current state of the cable detection.
#define PP_DATA_IN
The DATA IN bit.
ULONG T_3_RECV_EOI_RECOGNIZED
= 70 us: How long to set DATA to ack an EOI
#define DBG_SUCCESS(_xxx)
#define CBMIEC_RELEASE(_rel)
#define PERF_EVENT_READ_BYTE_NO(_x_)
VOID cbmiec_block_irq(PDEVICE_EXTENSION Pdx)
Block all interrupts.
NTSTATUS cbmiec_checkcable(PDEVICE_EXTENSION Pdx)
Determine the type of cable (XA1541/XM1541) on the IEC bus.
ULONG T_6_RECV_BIT_WAIT_CLK_LOW
= 20 us: How long to wait for CLK low again (=inactive) after every single bit
Definitions for the opencbm driver.
#define PERF_EVENT_READ_BYTE(_x_)
VOID cbmiec_release_irq(PDEVICE_EXTENSION Pdx)
Release the interrupts.
#define PERF_EVENT_READ_BIT_NO(_x_)
ULONG T_2_Times
x T_2 is 40