summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Michael Green <plugwash@debian.org>2021-01-28 20:18:56 +0000
committerPeter Michael Green <plugwash@debian.org>2021-01-28 20:18:56 +0000
commitf44ff825f6955d6531b13ed21ac44a3e17aeb192 (patch)
treea03d6daa176090106c3050253a754fb71647e6c2
parent07948354931d7485dc8b91476fa328a2bd3448b7 (diff)
Fix detection of whether or not the system is a raspberry pi.
-rw-r--r--pigpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pigpio.c b/pigpio.c
index 92b9bf7..7713759 100644
--- a/pigpio.c
+++ b/pigpio.c
@@ -13754,7 +13754,7 @@ unsigned gpioHardwareRevision(void)
if ((rev & 0x800000) == 0) /* old rev code */
{
- if (rev < 0x0016) /* all BCM2835 */
+ if ((rev > 0) && (rev < 0x0016)) /* all BCM2835 */
{
pi_ispi = 1;
piCores = 1;