diff --git a/Raspberry.IO.GeneralPurpose/GpioConnectionDriver.cs b/Raspberry.IO.GeneralPurpose/GpioConnectionDriver.cs index 94f11a8..b1e5d1b 100644 --- a/Raspberry.IO.GeneralPurpose/GpioConnectionDriver.cs +++ b/Raspberry.IO.GeneralPurpose/GpioConnectionDriver.cs @@ -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: diff --git a/Raspberry.IO.GeneralPurpose/MemoryGpioConnectionDriver.cs b/Raspberry.IO.GeneralPurpose/MemoryGpioConnectionDriver.cs index 98af11f..fce392b 100644 --- a/Raspberry.IO.GeneralPurpose/MemoryGpioConnectionDriver.cs +++ b/Raspberry.IO.GeneralPurpose/MemoryGpioConnectionDriver.cs @@ -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: diff --git a/Raspberry.IO.InterIntegratedCircuit/I2cDriver.cs b/Raspberry.IO.InterIntegratedCircuit/I2cDriver.cs index 20dc8e2..c435f62 100644 --- a/Raspberry.IO.InterIntegratedCircuit/I2cDriver.cs +++ b/Raspberry.IO.InterIntegratedCircuit/I2cDriver.cs @@ -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); @@ -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: @@ -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: diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs index 5a1148d..14c402f 100644 --- a/SharedAssemblyInfo.cs +++ b/SharedAssemblyInfo.cs @@ -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("")] @@ -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")]