hi all
im teaching parallel port driver
im looking at baker’s old book
chapter 9
is this correct?
here is his XxTransmitBytes
XxTransmitBytes( )
{
//…
// Send as many bytes to the device as it
// can handle. Each byte must be strobed
// out.
//
while( XferSize > 0 ) {
//
// Make sure the STROBE line is off
//
XxWriteControl( pDE, Control & ~XX_CTL_STROBE );
//
// Send a byte and hold it for at least
// 500 nano-seconds
//
XxWriteData( pDE, *pDE->pBuffer );// where is a fifo pointer being advanced???
KeStallExecutionProcessor( 1 );
//
// Turn on the STROBE line and hold it
// for at least 500 nano-seconds
//
XxWriteControl( pDE, Control | XX_CTL_STROBE );
KeStallExecutionProcessor( 1 );
//
// Turn off the STROBE line
//
XxWriteControl( pDE, Control & ~XX_CTL_STROBE );
KeStallExecutionProcessor( 1 );
//
// Update pointer and counters
//
pDE->pBuffer++;
XferSize–;
pDE->BytesRemaining–;
}
}
1… now, according to baker, you must strobe each byte.
is this not the job of the interupt mechanism?
i mean, if we have to strobe each byte, then when will
we ever recieve an interrupt???
2… if the hw can handle 2 bytes (fifoSize==2)
where is a fifo pointer being advanced?
3… from his XxStartIo he called XxTransferBytes wrapped in KeSynchronizeExecution
why would you ever need to do this?
i mean, if you are now initiating an io, you are not expecting interrupts.
???unless you expect an error interrupt…???
could it be that he was getting interrupts from the strobe?
and had to mask them out???
please, please help me
this is very important
thanks
assaf
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com