Skip to content
This repository was archived by the owner on Apr 10, 2020. It is now read-only.
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
8 changes: 3 additions & 5 deletions Raspberry.IO.GeneralPurpose/GpioConnectionDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,11 @@ private static uint GetProcessorBaseAddress(Processor processor)
{
switch (processor)
{
case Processor.Bcm2708:
case Processor.Bcm2835:
return Interop.BCM2835_GPIO_BASE;

case Processor.Bcm2709:
return Interop.BCM2836_GPIO_BASE;

case Processor.BCM2835: // <- added this one JJ FIX per RB3
case Processor.Bcm2836:
case Processor.Bcm2837:
return Interop.BCM2836_GPIO_BASE;

default:
Expand Down
5 changes: 3 additions & 2 deletions Raspberry.IO.GeneralPurpose/MemoryGpioConnectionDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,11 @@ private static uint GetProcessorBaseAddress(Processor processor)
{
switch (processor)
{
case Processor.Bcm2708:
case Processor.Bcm2835:
return Interop.BCM2835_GPIO_BASE;

case Processor.Bcm2709:
case Processor.Bcm2836:
case Processor.Bcm2837:
return Interop.BCM2836_GPIO_BASE;

default:
Expand Down
15 changes: 8 additions & 7 deletions Raspberry.IO.InterIntegratedCircuit/I2cDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ internal byte[] Read(int deviceAddress, int byteCount)
if ((SafeReadUInt32(status) & Interop.BCM2835_BSC_S_CLKT) != 0) // Received Clock Stretch Timeout
throw new InvalidOperationException("Read operation failed with BCM2835_I2C_REASON_ERROR_CLKT status");
if (remaining != 0) // Not all data is received
throw new InvalidOperationException(string.Format("Read operation failed with BCM2835_I2C_REASON_ERROR_DATA status, missing {0} bytes", remaining));
throw new InvalidOperationException(
$"Read operation failed with BCM2835_I2C_REASON_ERROR_DATA status, missing {remaining} bytes" );

WriteUInt32Mask(control, Interop.BCM2835_BSC_S_DONE, Interop.BCM2835_BSC_S_DONE);

Expand All @@ -490,11 +491,11 @@ private static uint GetProcessorBscAddress(Processor processor)
{
switch (processor)
{
case Processor.Bcm2708:
case Processor.BCM2835: // <- added this one JJ FIX per RB3
case Processor.Bcm2835:
return Interop.BCM2835_BSC1_BASE;

case Processor.Bcm2709:
case Processor.Bcm2836:
case Processor.Bcm2837:
return Interop.BCM2836_BSC1_BASE;

default:
Expand All @@ -506,11 +507,11 @@ private static uint GetProcessorGpioAddress(Processor processor)
{
switch (processor)
{
case Processor.Bcm2708:
case Processor.BCM2835: // <- added this one JJ FIX per RB3
case Processor.Bcm2835:
return Interop.BCM2835_GPIO_BASE;

case Processor.Bcm2709:
case Processor.Bcm2836:
case Processor.Bcm2837:
return Interop.BCM2836_GPIO_BASE;

default:
Expand Down
6 changes: 3 additions & 3 deletions SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// associated with an assembly.
[assembly: AssemblyCompany("Raspberry#")]
[assembly: AssemblyProduct("Raspberry.IO")]
[assembly: AssemblyCopyright("www.raspberry-sharp.org, 2012-2015")]
[assembly: AssemblyCopyright("www.raspberry-sharp.org, 2012-2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -25,5 +25,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("3.1.1.0")]
[assembly: AssemblyFileVersion("3.1.1.0")]
[assembly: AssemblyVersion("3.1.2.0")]
[assembly: AssemblyFileVersion("3.1.2.0")]