lpbb.c (f1d19042b082d95f07a0027e596ba2405aa8a9a5) | lpbb.c (bc35c17446fab005a7e11b67b9004736f1c8498b) |
---|---|
1/*- 2 * Copyright (c) 1998 Nicolas Souchu, Marc Bouget 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) 1998 Nicolas Souchu, Marc Bouget 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: lpbb.c,v 1.2 1998/11/09 22:22:01 nsouch Exp $ | 26 * $Id: lpbb.c,v 1.3 1998/12/07 21:58:16 archie Exp $ |
27 * 28 */ 29 30/* 31 * I2C Bit-Banging over parallel port 32 * 33 * See the Official Philips interface description in lpbb(4) 34 */ --- 200 unchanged lines hidden (view full) --- 235static int getSDA(struct lpbb_softc *sc) 236{ 237if((ppb_rstr(&sc->lpbb_dev)&SDA_in)==SDA_in) 238 return 1; 239else 240 return 0; 241} 242 | 27 * 28 */ 29 30/* 31 * I2C Bit-Banging over parallel port 32 * 33 * See the Official Philips interface description in lpbb(4) 34 */ --- 200 unchanged lines hidden (view full) --- 235static int getSDA(struct lpbb_softc *sc) 236{ 237if((ppb_rstr(&sc->lpbb_dev)&SDA_in)==SDA_in) 238 return 1; 239else 240 return 0; 241} 242 |
243static int getSCL(struct lpbb_softc *sc) 244{ 245if((ppb_rstr(&sc->lpbb_dev)&SCL_in)==SCL_in) 246 return 1; 247else 248 return 0; 249} 250 | |
251static void setSDA(struct lpbb_softc *sc, char val) 252{ 253if(val==0) 254 ppb_wdtr(&sc->lpbb_dev, (u_char)SDA_out); 255else 256 ppb_wdtr(&sc->lpbb_dev, (u_char)~SDA_out); 257} 258 --- 69 unchanged lines hidden --- | 243static void setSDA(struct lpbb_softc *sc, char val) 244{ 245if(val==0) 246 ppb_wdtr(&sc->lpbb_dev, (u_char)SDA_out); 247else 248 ppb_wdtr(&sc->lpbb_dev, (u_char)~SDA_out); 249} 250 --- 69 unchanged lines hidden --- |