Skip to content

Commit f5c07a5

Browse files
committed
Added Bcm2835 support, this needs a different NuGet package: "Raspberry.System with RPi 3B support" instead of "Raspberry.System".
1 parent 6a9d3cb commit f5c07a5

File tree

15 files changed

+37
-39
lines changed

15 files changed

+37
-39
lines changed

Raspberry.IO.Components/Raspberry.IO.Components.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
<WarningLevel>4</WarningLevel>
3131
</PropertyGroup>
3232
<ItemGroup>
33-
<Reference Include="Raspberry.System, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
34-
<HintPath>$(SolutionDir)packages\Raspberry.System.2.1\lib\net40\Raspberry.System.dll</HintPath>
35-
<Private>True</Private>
36-
</Reference>
3733
<Reference Include="System" />
3834
<Reference Include="System.Core" />
3935
<Reference Include="System.Configuration" />
@@ -47,6 +43,9 @@
4743
<HintPath>$(SolutionDir)packages\UnitsNet.3.46.1\lib\net35\UnitsNet.dll</HintPath>
4844
<Private>True</Private>
4945
</Reference>
46+
<Reference Include="Raspberry.System">
47+
<HintPath>..\packages\Raspberry.System.3B.2.1.1\lib\net40\Raspberry.System.dll</HintPath>
48+
</Reference>
5049
</ItemGroup>
5150
<ItemGroup>
5251
<Compile Include="..\SharedAssemblyInfo.cs">

Raspberry.IO.Components/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<packages>
33
<package id="Common.Logging" version="3.3.1" targetFramework="net40" />
44
<package id="Common.Logging.Core" version="3.3.1" targetFramework="net40" />
5-
<package id="Raspberry.System" version="2.1" targetFramework="net40" />
5+
<package id="Raspberry.System.3B" version="2.1.1" targetFramework="net40" />
66
<package id="UnitsNet" version="3.46.1" targetFramework="net40" />
77
</packages>

Raspberry.IO.GeneralPurpose/GpioConnectionDriver.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ private static uint GetProcessorBaseAddress(Processor processor)
291291
{
292292
switch (processor)
293293
{
294+
case Processor.Bcm2835:
294295
case Processor.Bcm2708:
295296
return Interop.BCM2835_GPIO_BASE;
296297

Raspberry.IO.GeneralPurpose/MemoryGpioConnectionDriver.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ private static uint GetProcessorBaseAddress(Processor processor)
247247
{
248248
switch (processor)
249249
{
250+
case Processor.Bcm2835:
250251
case Processor.Bcm2708:
251252
return Interop.BCM2835_GPIO_BASE;
252253

Raspberry.IO.GeneralPurpose/Raspberry.IO.GeneralPurpose.csproj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@
3232
<DocumentationFile>bin\Release\Raspberry.IO.GeneralPurpose.XML</DocumentationFile>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="Raspberry.System, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
36-
<HintPath>$(SolutionDir)packages\Raspberry.System.2.1\lib\net40\Raspberry.System.dll</HintPath>
37-
<Private>True</Private>
38-
</Reference>
3935
<Reference Include="System" />
4036
<Reference Include="System.Configuration" />
4137
<Reference Include="System.Core" />
38+
<Reference Include="Raspberry.System">
39+
<HintPath>..\packages\Raspberry.System.3B.2.1.1\lib\net40\Raspberry.System.dll</HintPath>
40+
</Reference>
4241
</ItemGroup>
4342
<ItemGroup>
4443
<Compile Include="..\SharedAssemblyInfo.cs">
@@ -92,9 +91,6 @@
9291
<Name>Raspberry.IO</Name>
9392
</ProjectReference>
9493
</ItemGroup>
95-
<ItemGroup>
96-
<None Include="packages.config" />
97-
</ItemGroup>
9894
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
9995
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
10096
Other similar extension points exist, see Microsoft.Common.targets.
@@ -103,4 +99,7 @@
10399
<Target Name="AfterBuild">
104100
</Target>
105101
-->
102+
<ItemGroup>
103+
<None Include="packages.config" />
104+
</ItemGroup>
106105
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Raspberry.System" version="2.1" targetFramework="net40" />
3+
<package id="Raspberry.System.3B" version="2.1.1" targetFramework="net40" />
44
</packages>

Raspberry.IO.InterIntegratedCircuit/I2cDriver.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ private static uint GetProcessorBscAddress(Processor processor)
299299
{
300300
switch (processor)
301301
{
302+
case Processor.Bcm2835:
302303
case Processor.Bcm2708:
303304
return Interop.BCM2835_BSC1_BASE;
304305

@@ -314,6 +315,7 @@ private static uint GetProcessorGpioAddress(Processor processor)
314315
{
315316
switch (processor)
316317
{
318+
case Processor.Bcm2835:
317319
case Processor.Bcm2708:
318320
return Interop.BCM2835_GPIO_BASE;
319321

Raspberry.IO.InterIntegratedCircuit/Raspberry.IO.InterIntegratedCircuit.csproj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@
3232
<DocumentationFile>bin\Release\Raspberry.IO.InterIntegratedCircuit.XML</DocumentationFile>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="Raspberry.System, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
36-
<HintPath>$(SolutionDir)packages\Raspberry.System.2.1\lib\net40\Raspberry.System.dll</HintPath>
37-
<Private>True</Private>
38-
</Reference>
3935
<Reference Include="System" />
4036
<Reference Include="System.Configuration" />
4137
<Reference Include="System.Core" />
38+
<Reference Include="Raspberry.System">
39+
<HintPath>..\packages\Raspberry.System.3B.2.1.1\lib\net40\Raspberry.System.dll</HintPath>
40+
</Reference>
4241
</ItemGroup>
4342
<ItemGroup>
4443
<Compile Include="..\SharedAssemblyInfo.cs">
@@ -59,9 +58,6 @@
5958
<Name>Raspberry.IO.GeneralPurpose</Name>
6059
</ProjectReference>
6160
</ItemGroup>
62-
<ItemGroup>
63-
<None Include="packages.config" />
64-
</ItemGroup>
6561
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6662
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
6763
Other similar extension points exist, see Microsoft.Common.targets.
@@ -70,4 +66,7 @@
7066
<Target Name="AfterBuild">
7167
</Target>
7268
-->
69+
<ItemGroup>
70+
<None Include="packages.config" />
71+
</ItemGroup>
7372
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Raspberry.System" version="2.1" targetFramework="net40" />
3+
<package id="Raspberry.System.3B" version="2.1.1" targetFramework="net40" />
44
</packages>

Raspberry.IO.SerialPeripheralInterface/Raspberry.IO.SerialPeripheralInterface.csproj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@
3232
<DocumentationFile>bin\Release\Raspberry.IO.SerialPeripheralInterface.XML</DocumentationFile>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="Raspberry.System, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
36-
<HintPath>$(SolutionDir)packages\Raspberry.System.2.1\lib\net40\Raspberry.System.dll</HintPath>
37-
<Private>True</Private>
38-
</Reference>
3935
<Reference Include="System" />
4036
<Reference Include="System.Configuration" />
4137
<Reference Include="System.Core" />
38+
<Reference Include="Raspberry.System">
39+
<HintPath>..\packages\Raspberry.System.3B.2.1.1\lib\net40\Raspberry.System.dll</HintPath>
40+
</Reference>
4241
</ItemGroup>
4342
<ItemGroup>
4443
<Compile Include="..\SharedAssemblyInfo.cs">
@@ -82,9 +81,6 @@
8281
<Name>Raspberry.IO</Name>
8382
</ProjectReference>
8483
</ItemGroup>
85-
<ItemGroup>
86-
<None Include="packages.config" />
87-
</ItemGroup>
8884
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
8985
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
9086
Other similar extension points exist, see Microsoft.Common.targets.
@@ -93,4 +89,7 @@
9389
<Target Name="AfterBuild">
9490
</Target>
9591
-->
92+
<ItemGroup>
93+
<None Include="packages.config" />
94+
</ItemGroup>
9695
</Project>

0 commit comments

Comments
 (0)