diff options
Diffstat (limited to 'gnuradio-core/src/lib/io/i2c_bitbang.cc')
-rw-r--r-- | gnuradio-core/src/lib/io/i2c_bitbang.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gnuradio-core/src/lib/io/i2c_bitbang.cc b/gnuradio-core/src/lib/io/i2c_bitbang.cc index 401c76b0d4..eb801c68f5 100644 --- a/gnuradio-core/src/lib/io/i2c_bitbang.cc +++ b/gnuradio-core/src/lib/io/i2c_bitbang.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -32,7 +32,7 @@ i2c_bitbang::i2c_bitbang (i2c_bbio_sptr io) d_io->unlock (); } -i2c_sptr +i2c_sptr make_i2c_bitbang (i2c_bbio_sptr io) { return i2c_sptr (new i2c_bitbang (io)); @@ -43,7 +43,7 @@ make_i2c_bitbang (i2c_bbio_sptr io) // entry: SCL = 1, SDA = 1 // exit: SCL = 0, SDA = 0 -void +void i2c_bitbang::start () { set_sda (1); @@ -53,11 +53,11 @@ i2c_bitbang::start () } -// stop: +// stop: // entry: SCL = X, SDA = X // exit: SCL = 1, SDA = 1 -void +void i2c_bitbang::stop () { set_scl (0); @@ -71,7 +71,7 @@ i2c_bitbang::stop () // entry: SCL = 0, SDA = X // exit: SCL = 0, SDA = X -void +void i2c_bitbang::write_bit (bool bit) { set_sda (bit); @@ -114,7 +114,7 @@ bool i2c_bitbang::write (int addr, const unsigned char *buf, int nbytes) { bool ok = true; - + d_io->lock (); start (); ok = write_byte ((addr << 1) | 0); // addr plus "read opcode" |