raspberry_pi.c: update platform check for the PI 2 Version B
authorPaul Barrette <paulbarrette@gmail.com>
Sun, 26 Apr 2015 03:13:57 +0000 (04:13 +0100)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Mon, 27 Apr 2015 09:48:24 +0000 (10:48 +0100)
The latest Raspberry Pi 2 revision string is missing from the discovery
function mraa_raspberry_pi() and results in incorrect pin mapping defaulting to
PI_B Rev 1.

Signed-off-by: Paul Barrette <paul.barrette@windriver.com>
Signed-off-by: Paul Barrette <paulbarrette@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/arm/raspberry_pi.c

index b4e2348..57cefd2 100644 (file)
@@ -245,7 +245,7 @@ mraa_raspberry_pi()
                     b->platform_name = PLATFORM_NAME_RASPBERRY_PI_A_PLUS_REV_1;
                     platform_detected = PLATFORM_RASPBERRY_PI_A_PLUS_REV_1;
                     b->phy_pin_count = MRAA_RASPBERRY_PI_AB_PLUS_PINCOUNT;
-                } else if (strstr(line, "a01041")) {
+                } else if (strstr(line, "a01041") || strstr(line, "a21041")) {
                     b->platform_name = PLATFORM_NAME_RASPBERRY_PI2_B_REV_1;
                     platform_detected = PLATFORM_RASPBERRY_PI2_B_REV_1;
                     b->phy_pin_count = MRAA_RASPBERRY_PI2_B_REV_1_PINCOUNT;