Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added Pi4 Support#15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
nzaugg wants to merge1 commit intoraspberry-sharp:master
base:master
Choose a base branch
Loading
fromMindfireTechnology:features/Pi4Support
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletionsRaspberry.System/Board.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,7 +90,17 @@ public Processor Processor
get
{
Processor processor;
return Enum.TryParse(ProcessorName, true, out processor) ? processor : Processor.Unknown;
if (Enum.TryParse(ProcessorName, true, out processor))
{
// Check to see if we're dealing with a Pi 4 Model B
// The Pi 4 Model B currently lies to us and tells us that it's a BCM2835
if (processor == Processor.Bcm2835 && Model == Model.Pi4)
processor = Processor.Bcm2711;

return processor;
}

return Processor.Unknown;
}
}

Expand DownExpand Up@@ -245,7 +255,8 @@ private Model LoadModel()

case 0x2082:
return Model.B3;

case 0x03111:
return Model.Pi4;
default:
return Model.Unknown;
}
Expand All@@ -268,6 +279,7 @@ private ConnectorPinout LoadConnectorPinout()
case Model.B2:
case Model.Zero:
case Model.B3:
case Model.Pi4:
return ConnectorPinout.Plus;

default:
Expand Down
9 changes: 8 additions & 1 deletionRaspberry.System/Model.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,12 @@ public enum Model
/// <summary>
/// Pi 3 Model B.
/// </summary>
B3
B3,

/// <summary>
/// Pi 4
/// </summary>
Pi4
}

/// <summary>
Expand DownExpand Up@@ -93,6 +98,8 @@ public static string GetDisplayName(this Model model)
return "Raspberry Pi Zero";
case Model.B3:
return "Raspberry Pi 3 Model B";
case Model.Pi4:
return "Raspberry Pi 4 Model B";

default:
throw new ArgumentOutOfRangeException("model");
Expand Down
12 changes: 11 additions & 1 deletionRaspberry.System/Processor.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,6 +18,16 @@ public enum Processor
/// <summary>
/// Processor is a BCM2709.
/// </summary>
Bcm2709
Bcm2709,

/// <summary>
/// Processor is BCM2711
/// </summary>
Bcm2711,

/// <summary>
/// Processor is BCM2835
/// </summary>
Bcm2835
}
}

[8]ページ先頭

©2009-2025 Movatter.jp