ppb_1284.h revision 39134
1314125Sdelphij/*- 2238405Sjkim * Copyright (c) 1997 Nicolas Souchu 3238405Sjkim * All rights reserved. 4238405Sjkim * 5238405Sjkim * Redistribution and use in source and binary forms, with or without 6238405Sjkim * modification, are permitted provided that the following conditions 7238405Sjkim * are met: 8238405Sjkim * 1. Redistributions of source code must retain the above copyright 9238405Sjkim * notice, this list of conditions and the following disclaimer. 10238405Sjkim * 2. Redistributions in binary form must reproduce the above copyright 11238405Sjkim * notice, this list of conditions and the following disclaimer in the 12238405Sjkim * documentation and/or other materials provided with the distribution. 13238405Sjkim * 14238405Sjkim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15238405Sjkim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16238405Sjkim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17238405Sjkim * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18238405Sjkim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19238405Sjkim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20238405Sjkim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21238405Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22238405Sjkim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23238405Sjkim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24238405Sjkim * SUCH DAMAGE. 25238405Sjkim * 26238405Sjkim * $Id: ppb_1284.h,v 1.2 1998/08/03 19:14:31 msmith Exp $ 27238405Sjkim * 28238405Sjkim */ 29238405Sjkim#ifndef __1284_H 30238405Sjkim#define __1284_H 31238405Sjkim 32238405Sjkim/* 33238405Sjkim * IEEE1284 signals 34238405Sjkim */ 35238405Sjkim 36238405Sjkim/* host driven signals */ 37238405Sjkim 38238405Sjkim#define nHostClk STROBE 39238405Sjkim#define Write STROBE 40238405Sjkim 41276861Sjkim#define nHostBusy AUTOFEED 42276861Sjkim#define nHostAck AUTOFEED 43238405Sjkim#define DStrb AUTOFEED 44238405Sjkim 45238405Sjkim#define nReveseRequest nINIT 46238405Sjkim 47238405Sjkim#define nActive1284 SELECTIN 48238405Sjkim#define AStrb SELECTIN 49314125Sdelphij 50238405Sjkim/* peripheral driven signals */ 51238405Sjkim 52238405Sjkim#define nDataAvail nFAULT 53276861Sjkim#define nPeriphRequest nFAULT 54276861Sjkim 55276861Sjkim#define Xflag SELECT 56238405Sjkim 57314125Sdelphij#define AckDataReq PERROR 58314125Sdelphij#define nAckReverse PERROR 59314125Sdelphij 60314125Sdelphij#define nPtrBusy nBUSY 61238405Sjkim#define nPeriphAck nBUSY 62314125Sdelphij#define Wait nBUSY 63314125Sdelphij 64314125Sdelphij#define PtrClk nACK 65276861Sjkim#define PeriphClk nACK 66238405Sjkim#define Intr nACK 67238405Sjkim 68238405Sjkim/* request mode values */ 69238405Sjkim#define NIBBLE_1284_NORMAL 0 70238405Sjkim#define NIBBLE_1284_REQUEST_ID 4 71238405Sjkim 72238405Sjkim/* how to terminate */ 73238405Sjkim#define VALID_STATE 0 74238405Sjkim#define IMMEDIATE 1 75238405Sjkim 76238405Sjkimextern int do_1284_wait(struct ppb_device *, char, char); 77238405Sjkim 78238405Sjkimextern int nibble_1284_inbyte(struct ppb_device *, char *); 79238405Sjkimextern void nibble_1284_sync(struct ppb_device *); 80238405Sjkimextern int nibble_1284_mode(struct ppb_device *, int); 81238405Sjkim 82238405Sjkimextern int ppb_1284_negociate(struct ppb_device *, int); 83238405Sjkimextern int ppb_1284_terminate(struct ppb_device *, int how); 84238405Sjkim 85238405Sjkim#endif 86238405Sjkim