Lines Matching +full:idle +full:- +full:wait +full:- +full:delay

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
33 * General purpose routines for the IEEE1284-1994 Standard
56 * Wait for the peripherial up to 40ms
82 ppb->error = PPB_NO_ERROR; in ppb_1284_reset_error()
83 ppb->state = state; in ppb_1284_reset_error()
98 mtx_assert(ppb->ppc_lock, MA_OWNED); in ppb_1284_get_state()
99 return (ppb->state); in ppb_1284_get_state()
114 mtx_assert(ppb->ppc_lock, MA_OWNED); in ppb_1284_set_state()
115 if ((ppb->state != PPB_ERROR) && in ppb_1284_set_state()
116 (ppb->error == PPB_NO_ERROR)) { in ppb_1284_set_state()
117 ppb->state = state; in ppb_1284_set_state()
118 ppb->error = PPB_NO_ERROR; in ppb_1284_set_state()
130 if ((ppb->error == PPB_NO_ERROR) && in ppb_1284_set_error()
131 (ppb->state != PPB_ERROR)) { in ppb_1284_set_error()
132 ppb->error = error; in ppb_1284_set_error()
133 ppb->state = PPB_ERROR; in ppb_1284_set_error()
207 /* wait host */ in ppb_peripheral_negociate()
209 while (spin-- && (ppb_rstr(bus) & nBUSY)) in ppb_peripheral_negociate()
210 DELAY(1); in ppb_peripheral_negociate()
218 /* Event 4 - read ext. value */ in ppb_peripheral_negociate()
224 /* Event 5 - restore direction bit, no data avail */ in ppb_peripheral_negociate()
226 DELAY(1); in ppb_peripheral_negociate()
253 /* Event 5 - mode not supported */ in ppb_peripheral_negociate()
255 DELAY(1); in ppb_peripheral_negociate()
293 /* Event 22 - wait up to host response time (1s) */ in ppb_peripheral_terminate()
302 /* Event 25 - wait up to host response time (1s) */ in ppb_peripheral_terminate()
310 DELAY(1); in ppb_peripheral_terminate()
314 /* Event 28 - wait up to host response time (1s) */ in ppb_peripheral_terminate()
349 /* Event 15 - put byte on data lines */ in byte_peripheral_outbyte()
358 /* Event 10 - wait data read */ in byte_peripheral_outbyte()
372 /* Event 16 - wait strobe */ in byte_peripheral_outbyte()
402 /* wait forever, the remote host is master and should initiate in byte_peripheral_write()
425 if ((error = byte_peripheral_outbyte(bus, buffer+i, (i == len-1)))) in byte_peripheral_write()
446 /* Event 7 - ready to take data (nAUTO low) */ in byte_1284_inbyte()
449 /* Event 9 - peripheral set nAck low */ in byte_1284_inbyte()
458 /* Event 10 - data received, can't accept more */ in byte_1284_inbyte()
461 /* Event 11 - peripheral ack */ in byte_1284_inbyte()
467 /* Event 16 - strobe */ in byte_1284_inbyte()
469 DELAY(3); in byte_1284_inbyte()
488 /* Event 7 - ready to take data (nAUTO low) */ in nibble_1284_inbyte()
491 /* Event 8 - peripheral writes the first nibble */ in nibble_1284_inbyte()
493 /* Event 9 - peripheral set nAck low */ in nibble_1284_inbyte()
502 /* Event 10 - ack, nibble received */ in nibble_1284_inbyte()
505 /* Event 11 - wait ack from peripherial */ in nibble_1284_inbyte()
684 DELAY(1); in ppb_1284_negociate()
689 /* Event 0 - put the exten. value on the data lines */ in ppb_1284_negociate()
695 DELAY(1); in ppb_1284_negociate()
698 DELAY(1); in ppb_1284_negociate()
702 /* Event 1 - enter IEEE1284 mode */ in ppb_1284_negociate()
706 /* ignore the PError line, wait a bit more, remote host's in ppb_1284_negociate()
715 /* Event 2 - trying IEEE1284 dialog */ in ppb_1284_negociate()
724 /* Event 3 - latch the ext. value to the peripheral */ in ppb_1284_negociate()
726 DELAY(1); in ppb_1284_negociate()
728 /* Event 4 - IEEE1284 device recognized */ in ppb_1284_negociate()
731 /* Event 6 - waiting for status lines */ in ppb_1284_negociate()
738 /* Event 7 - querying result consider nACK not to misunderstand in ppb_1284_negociate()
762 /* enter reverse idle phase */ in ppb_1284_negociate()
828 DELAY(1); in ppb_1284_terminate()
831 /* Event 22 - set nSelectin low and nAutoFeed high */ in ppb_1284_terminate()
834 /* Event 24 - waiting for peripheral, Xflag ignored */ in ppb_1284_terminate()
840 /* Event 25 - set nAutoFd low */ in ppb_1284_terminate()
843 /* Event 26 - compatible mode status is set */ in ppb_1284_terminate()
845 /* Event 27 - peripheral set nAck high */ in ppb_1284_terminate()
850 /* Event 28 - end termination, return to idle phase */ in ppb_1284_terminate()