示例#1
0
    def __init__(self, bus, raw=False):
        """
        __init__(mraa::I2c self, int bus, bool raw=False) -> I2c

        Parameters
        ----------
        bus: int
        raw: bool

        __init__(mraa::I2c self, int bus) -> I2c

        Parameters
        ----------
        bus: int




        I2C constructor, takes a pointer to a I2C context and initialises the
        I2C class

        Parameters:
        -----------

        void:  * to an I2C context 
        """
        this = _mraa.new_I2c(bus, raw)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
示例#2
0
    def __init__(self, bus, raw=False):
        """
        __init__(mraa::I2c self, int bus, bool raw=False) -> I2c

        Parameters:
            bus: int
            raw: bool

        __init__(mraa::I2c self, int bus) -> I2c

        Parameters:
            bus: int

        """
        this = _mraa.new_I2c(bus, raw)
        try:
            self.this.append(this)
        except:
            self.this = this
示例#3
0
    def __init__(self, bus, raw=False):
        """
        __init__(mraa::I2c self, int bus, bool raw=False) -> I2c

        Parameters:
            bus: int
            raw: bool

        __init__(mraa::I2c self, int bus) -> I2c

        Parameters:
            bus: int

        """
        this = _mraa.new_I2c(bus, raw)
        try:
            self.this.append(this)
        except:
            self.this = this
示例#4
0
 def __init__(self, bus, raw=False):
     this = _mraa.new_I2c(bus, raw)
     try:
         self.this.append(this)
     except __builtin__.Exception:
         self.this = this