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

Commit 37e55de

Browse files
authored
Add Pi 3 4.9 kernel detection
1 parent f9a870f commit 37e55de

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Adafruit_GPIO/Platform.py

+4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def pi_version():
8686
# Check /proc/cpuinfo for the Hardware field value.
8787
# 2708 is pi 1
8888
# 2709 is pi 2
89+
# 2835 is pi 3 on 4.9.x kernel
8990
# Anything else is not a pi.
9091
with open('/proc/cpuinfo', 'r') as infile:
9192
cpuinfo = infile.read()
@@ -101,6 +102,9 @@ def pi_version():
101102
elif match.group(1) == 'BCM2709':
102103
# Pi 2
103104
return 2
105+
elif match.group(1) == 'BCM2835':
106+
# Pi 3 / Pi on 4.9.x kernel
107+
return 3
104108
else:
105109
# Something else, not a pi.
106110
return None

0 commit comments

Comments
 (0)