Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Commit c543d1d

Browse files
authored
Check for older BCM2708 combined mode path before attempting to set.
1 parent f17faee commit c543d1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Adafruit_GPIO/I2C.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
# THE SOFTWARE.
2222
import logging
23+
import os
2324
import subprocess
2425

2526
import Adafruit_GPIO.Platform as Platform
@@ -72,7 +73,7 @@ def require_repeated_start():
7273
http://www.raspberrypi.org/forums/viewtopic.php?f=44&t=15840
7374
"""
7475
plat = Platform.platform_detect()
75-
if plat == Platform.RASPBERRY_PI:
76+
if plat == Platform.RASPBERRY_PI and os.path.exists('/sys/module/i2c_bcm2708/parameters/combined'):
7677
# On the Raspberry Pi there is a bug where register reads don't send a
7778
# repeated start condition like the kernel smbus I2C driver functions
7879
# define. As a workaround this bit in the BCM2708 driver sysfs tree can

0 commit comments

Comments
 (0)