Fix nullable
This commit is contained in:
parent
b469c4ed6e
commit
902fdd9b25
@ -7,7 +7,11 @@ namespace Unosquare.RaspberryIO.Abstractions {
|
|||||||
public static class Definitions {
|
public static class Definitions {
|
||||||
private static readonly Int32[] GpioToPhysR1 = { 3, 5, -1, -1, 7, -1, -1, 26, 24, 21, 19, 23, -1, -1, 8, 10, -1, 11, 12, -1, -1, 13, 15, 16, 18, 22, -1, -1, -1, -1, -1, -1 };
|
private static readonly Int32[] GpioToPhysR1 = { 3, 5, -1, -1, 7, -1, -1, 26, 24, 21, 19, 23, -1, -1, 8, 10, -1, 11, 12, -1, -1, 13, 15, 16, 18, 22, -1, -1, -1, -1, -1, -1 };
|
||||||
|
|
||||||
private static readonly Int32[] GpioToPhysR2 = { 27, 28, 3, 5, 7, 29, 31, 26, 24, 21, 19, 23, 32, 33, 8, 10, 36, 11, 12, 35, 38, 40, 15, 16, 18, 22, 37, 13, /*P1*/ 3, 4, 5, 6 /*P5*/ };
|
private static readonly Int32[] GpioToPhysR2 =
|
||||||
|
{
|
||||||
|
27, 28, 3, 5, 7, 29, 31, 26, 24, 21, 19, 23, 32, 33, 8, 10, 36, 11, 12, 35, 38, 40, 15, 16, 18, 22, 37, 13, // P1
|
||||||
|
3, 4, 5, 6, // P5
|
||||||
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// BCMs to physical pin number.
|
/// BCMs to physical pin number.
|
||||||
|
@ -7,44 +7,44 @@ namespace Unosquare.RaspberryIO.Abstractions {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="System.Collections.Generic.IReadOnlyCollection{IGpioPin}" />
|
/// <seealso cref="System.Collections.Generic.IReadOnlyCollection{IGpioPin}" />
|
||||||
public interface IGpioController : IReadOnlyCollection<IGpioPin> {
|
public interface IGpioController : IReadOnlyCollection<IGpioPin> {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="IGpioPin"/> with the specified BCM pin.
|
/// Gets the <see cref="IGpioPin"/> with the specified BCM pin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The <see cref="IGpioPin"/>.
|
/// The <see cref="IGpioPin"/>.
|
||||||
/// </value>
|
/// </value>
|
||||||
/// <param name="bcmPinNumber">The BCM pin number.</param>
|
/// <param name="bcmPinNumber">The BCM pin number.</param>
|
||||||
/// <returns>A reference to the GPIO pin.</returns>
|
/// <returns>A reference to the GPIO pin.</returns>
|
||||||
IGpioPin this[Int32 bcmPinNumber] { get; }
|
IGpioPin this[Int32 bcmPinNumber] { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="IGpioPin"/> with the specified BCM pin.
|
/// Gets the <see cref="IGpioPin"/> with the specified BCM pin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The <see cref="IGpioPin"/>.
|
/// The <see cref="IGpioPin"/>.
|
||||||
/// </value>
|
/// </value>
|
||||||
/// <param name="bcmPin">The BCM pin.</param>
|
/// <param name="bcmPin">The BCM pin.</param>
|
||||||
/// <returns>A reference to the GPIO pin.</returns>
|
/// <returns>A reference to the GPIO pin.</returns>
|
||||||
IGpioPin this[BcmPin bcmPin] { get; }
|
IGpioPin this[BcmPin bcmPin] { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="IGpioPin"/> with the specified pin number.
|
/// Gets the <see cref="IGpioPin"/> with the specified pin number.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The <see cref="IGpioPin"/>.
|
/// The <see cref="IGpioPin"/>.
|
||||||
/// </value>
|
/// </value>
|
||||||
/// <param name="pinNumber">The pin number in header P1.</param>
|
/// <param name="pinNumber">The pin number in header P1.</param>
|
||||||
/// <returns>A reference to the GPIO pin.</returns>
|
/// <returns>A reference to the GPIO pin.</returns>
|
||||||
IGpioPin this[P1 pinNumber] { get; }
|
IGpioPin this[P1 pinNumber] { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="IGpioPin"/> with the specified pin number.
|
/// Gets the <see cref="IGpioPin"/> with the specified pin number.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The <see cref="IGpioPin"/>.
|
/// The <see cref="IGpioPin"/>.
|
||||||
/// </value>
|
/// </value>
|
||||||
/// <param name="pinNumber">The pin number in header P5.</param>
|
/// <param name="pinNumber">The pin number in header P5.</param>
|
||||||
/// <returns>A reference to the GPIO pin.</returns>
|
/// <returns>A reference to the GPIO pin.</returns>
|
||||||
IGpioPin this[P5 pinNumber] { get; }
|
IGpioPin this[P5 pinNumber] { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#nullable enable
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace Unosquare.RaspberryIO.Abstractions.Native {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="error">The error.</param>
|
/// <param name="error">The error.</param>
|
||||||
/// <returns>The error string.</returns>
|
/// <returns>The error string.</returns>
|
||||||
public static String? Strerror(Int32 error) {
|
public static String Strerror(Int32 error) {
|
||||||
if(Type.GetType("Mono.Runtime") == null) {
|
if(Type.GetType("Mono.Runtime") == null) {
|
||||||
return Marshal.PtrToStringAnsi(StrError(error));
|
return Marshal.PtrToStringAnsi(StrError(error));
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@ This library enables developers to use the various Raspberry Pi's hardware modul
|
|||||||
<PackageLicenseUrl>https://raw.githubusercontent.com/unosquare/raspberryio/master/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://raw.githubusercontent.com/unosquare/raspberryio/master/LICENSE</PackageLicenseUrl>
|
||||||
<PackageTags>Raspberry Pi GPIO Camera SPI I2C Embedded IoT Mono C# .NET</PackageTags>
|
<PackageTags>Raspberry Pi GPIO Camera SPI I2C Embedded IoT Mono C# .NET</PackageTags>
|
||||||
<LangVersion>8.0</LangVersion>
|
<LangVersion>8.0</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user