From f6e87f63e05c1c3e79c2b7bbeea7a77e80d86fcb Mon Sep 17 00:00:00 2001 From: Paul Barrette Date: Sun, 26 Apr 2015 04:13:57 +0100 Subject: [PATCH] raspberry_pi.c: update platform check for the PI 2 Version B 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 Signed-off-by: Paul Barrette Signed-off-by: Brendan Le Foll --- src/arm/raspberry_pi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arm/raspberry_pi.c b/src/arm/raspberry_pi.c index b4e2348..57cefd2 100644 --- a/src/arm/raspberry_pi.c +++ b/src/arm/raspberry_pi.c @@ -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;