]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/generic_linux/i2c.py
Display a message if user tries to set freq on linux
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / generic_linux / i2c.py
index f6bee20c8f878ab18fbbb08fb620594556dc2cd5..a5db827dc30d422e64924faf1f4f1aa60036fc48 100644 (file)
@@ -6,7 +6,11 @@ from Adafruit_PureIO import smbus
 
 
 class I2C:
 
 
 class I2C:
-    """I2C class"""
+    """
+    I2C class
+
+    Baudrate has no effect on Linux systems. The argument is only there for compatibility.
+    """
 
     MASTER = 0
     SLAVE = 1
 
     MASTER = 0
     SLAVE = 1
@@ -20,8 +24,8 @@ class I2C:
             raise NotImplementedError("Only I2C Master supported!")
         _mode = self.MASTER
 
             raise NotImplementedError("Only I2C Master supported!")
         _mode = self.MASTER
 
-        # if baudrate != None:
-        #    print("I2C frequency is not settable in python, ignoring!")
+        if baudrate is not None:
+            print("I2C frequency is not settable in python, ignoring!")
 
         try:
             self._i2c_bus = smbus.SMBus(bus_num)
 
         try:
             self._i2c_bus = smbus.SMBus(bus_num)