Fix detection of whether or not the system is a raspberry pi.
authorPeter Michael Green <plugwash@debian.org>
Thu, 28 Jan 2021 20:18:56 +0000 (20:18 +0000)
committerPeter Michael Green <plugwash@debian.org>
Thu, 28 Jan 2021 20:18:56 +0000 (20:18 +0000)
pigpio.c

index 92b9bf7f519bc5177bb40f246f6144f9c08ebddc..7713759b33ef0d91571c9551cf58f21c3a2c40c9 100644 (file)
--- 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;