Skip to content

Add CM3 support #9

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
Binary file modified Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![NuGet Badge](https://buildstats.info/nuget/Raspberry.System3)](https://www.nuget.org/packages/Raspberry.System3/)[![Build status](https://ci.appveyor.com/api/projects/status/d9bswf8kwk484tva?svg=true)](https://ci.appveyor.com/project/JTrotta/raspberry-sharp-system) [![BCH compliance](https://bettercodehub.com/edge/badge/JTrotta/raspberry-sharp-system?branch=master)](https://bettercodehub.com/)

Raspberry# System
=================

Expand All @@ -15,8 +17,8 @@ Features

### Raspberry.System
Raspberry.System provides utilities for Raspberry Pi boards, while using .NET concepts, syntax and case.
You can easily add a reference to it in your Visual Studio projects using the **[Raspberry.System Nuget](https://www.nuget.org/packages/Raspberry.System)**.
You can easily add a reference to it in your Visual Studio projects using the **[Raspberry.System Nuget](https://www.nuget.org/packages/Raspberry.System3)**.

It currently support the following features:
+ Automatic detection of various Raspberry Pi revisions, as of 2013-09, **Raspberry Pi model B rev1 and rev2 and Raspberry Pi model A**
+ High resolution (about 1�s) timers
+ High resolution (about 1µs) timers
Binary file added Raspberry.System.3.0.0.nupkg
Binary file not shown.
33 changes: 0 additions & 33 deletions Raspberry.System.nuspec

This file was deleted.

11 changes: 9 additions & 2 deletions Raspberry.System/Board.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,15 @@ private Model LoadModel()
case 0x0093:
return Model.Zero;

case 0x00C1:
return Model.ZeroW;

case 0x2082:
return Model.B3;


case 0x20A0:
return Model.ComputeModule3;

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

default:
Expand All @@ -277,4 +284,4 @@ private ConnectorPinout LoadConnectorPinout()

#endregion
}
}
}
20 changes: 17 additions & 3 deletions Raspberry.System/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,20 @@ public enum Model
/// </summary>
Zero,

/// <summary>
/// Pi Zero W.
/// </summary>
ZeroW,

/// <summary>
/// Pi 3 Model B.
/// </summary>
B3
B3,

/// <summary>
/// Compute module 3.
/// </summary>
ComputeModule3,
}

/// <summary>
Expand Down Expand Up @@ -91,12 +101,16 @@ public static string GetDisplayName(this Model model)
return "Raspberry Pi 2 Model B";
case Model.Zero:
return "Raspberry Pi Zero";
case Model.ZeroW:
return "Raspberry Pi Zero W";
case Model.B3:
return "Raspberry Pi 3 Model B";

case Model.ComputeModule3:
return "Raspberry Pi Compute Module 3";

default:
throw new ArgumentOutOfRangeException("model");
}
}
}
}
}
7 changes: 6 additions & 1 deletion Raspberry.System/Processor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public enum Processor
/// <summary>
/// Processor is a BCM2709.
/// </summary>
Bcm2709
Bcm2709,

/// <summary>
/// Processor is BCM2835
/// </summary>
BCM2835 // <- added this one JJ FIX per RB3/CM3
}
}
4 changes: 2 additions & 2 deletions Raspberry.System/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyVersion("3.1.1.0")]
[assembly: AssemblyFileVersion("3.1.1.0")]