Skip to content

Commit f1dcd9d

Browse files
committed
adding support for Raspberry Pi 2
1 parent b5070db commit f1dcd9d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Raspberry.System/Board.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class Board
2121
private static readonly Lazy<Board> board = new Lazy<Board>(LoadBoard);
2222
private readonly Dictionary<string, string> settings;
2323

24-
private const string raspberryPiProcessor = "BCM2708";
24+
private string[] raspberryPiProcessor = new string[] { "BCM2708", "BCM2709" };
2525

2626
#endregion
2727

@@ -52,7 +52,7 @@ public static Board Current
5252
/// </value>
5353
public bool IsRaspberryPi
5454
{
55-
get { return string.Equals(Processor, raspberryPiProcessor, StringComparison.InvariantCultureIgnoreCase); }
55+
get { return (Array.IndexOf(raspberryPiProcessor, Processor) >= 0); }
5656
}
5757

5858
/// <summary>
@@ -139,6 +139,9 @@ public char Model
139139
case 0x10:
140140
return 'B';
141141

142+
case 0x1a01040:
143+
return '2';
144+
142145
default:
143146
return (char)0;
144147
}
@@ -175,6 +178,9 @@ public int Revision
175178

176179
case 0x10:
177180
return 3; // Model B+, rev3
181+
182+
case 0x1a01040:
183+
return 4;
178184

179185
default:
180186
return 0; // Unknown

0 commit comments

Comments
 (0)