ppi.c (43301) | ppi.c (43433) |
---|---|
1/*- 2 * Copyright (c) 1997, 1998 Nicolas Souchu, Michael Smith 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1997, 1998 Nicolas Souchu, Michael Smith 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $Id: ppi.c,v 1.9 1999/01/10 12:04:55 nsouch Exp $ | 26 * $Id: ppi.c,v 1.10 1999/01/27 21:49:53 dillon Exp $ |
27 * 28 */ 29#include "ppi.h" 30 31#if NPPI > 0 32 33#include <sys/param.h> 34#include <sys/systm.h> --- 447 unchanged lines hidden (view full) --- 482 *val = ppb_rdtr(&ppi->ppi_dev); 483 break; 484 case PPIGSTATUS: /* get status bits */ 485 *val = ppb_rstr(&ppi->ppi_dev); 486 break; 487 case PPIGCTRL: /* get control bits */ 488 *val = ppb_rctr(&ppi->ppi_dev); 489 break; | 27 * 28 */ 29#include "ppi.h" 30 31#if NPPI > 0 32 33#include <sys/param.h> 34#include <sys/systm.h> --- 447 unchanged lines hidden (view full) --- 482 *val = ppb_rdtr(&ppi->ppi_dev); 483 break; 484 case PPIGSTATUS: /* get status bits */ 485 *val = ppb_rstr(&ppi->ppi_dev); 486 break; 487 case PPIGCTRL: /* get control bits */ 488 *val = ppb_rctr(&ppi->ppi_dev); 489 break; |
490 case PPIGEPP: /* get EPP bits */ 491 *val = ppb_repp(&ppi->ppi_dev); | 490 case PPIGEPPD: /* get EPP data bits */ 491 *val = ppb_repp_D(&ppi->ppi_dev); |
492 break; 493 case PPIGECR: /* get ECP bits */ 494 *val = ppb_recr(&ppi->ppi_dev); 495 break; 496 case PPIGFIFO: /* read FIFO */ 497 *val = ppb_rfifo(&ppi->ppi_dev); 498 break; 499 500 case PPISDATA: /* set data register */ 501 ppb_wdtr(&ppi->ppi_dev, *val); 502 break; 503 case PPISSTATUS: /* set status bits */ 504 ppb_wstr(&ppi->ppi_dev, *val); 505 break; 506 case PPISCTRL: /* set control bits */ 507 ppb_wctr(&ppi->ppi_dev, *val); 508 break; | 492 break; 493 case PPIGECR: /* get ECP bits */ 494 *val = ppb_recr(&ppi->ppi_dev); 495 break; 496 case PPIGFIFO: /* read FIFO */ 497 *val = ppb_rfifo(&ppi->ppi_dev); 498 break; 499 500 case PPISDATA: /* set data register */ 501 ppb_wdtr(&ppi->ppi_dev, *val); 502 break; 503 case PPISSTATUS: /* set status bits */ 504 ppb_wstr(&ppi->ppi_dev, *val); 505 break; 506 case PPISCTRL: /* set control bits */ 507 ppb_wctr(&ppi->ppi_dev, *val); 508 break; |
509 case PPISEPP: /* set EPP bits */ 510 ppb_wepp(&ppi->ppi_dev, *val); | 509 case PPISEPPD: /* set EPP data bits */ 510 ppb_wepp_D(&ppi->ppi_dev, *val); |
511 break; 512 case PPISECR: /* set ECP bits */ 513 ppb_wecr(&ppi->ppi_dev, *val); 514 break; 515 case PPISFIFO: /* write FIFO */ 516 ppb_wfifo(&ppi->ppi_dev, *val); 517 break; | 511 break; 512 case PPISECR: /* set ECP bits */ 513 ppb_wecr(&ppi->ppi_dev, *val); 514 break; 515 case PPISFIFO: /* write FIFO */ 516 ppb_wfifo(&ppi->ppi_dev, *val); 517 break; |
518 519 case PPIGEPPA: /* get EPP address bits */ 520 *val = ppb_repp_A(&ppi->ppi_dev); 521 break; 522 case PPISEPPA: /* set EPP address bits */ 523 ppb_wepp_A(&ppi->ppi_dev, *val); 524 break; |
|
518 default: 519 error = ENOTTY; 520 break; 521 } 522 523 return (error); 524} 525 --- 59 unchanged lines hidden --- | 525 default: 526 error = ENOTTY; 527 break; 528 } 529 530 return (error); 531} 532 --- 59 unchanged lines hidden --- |