question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I described my problem here #1222, I solved writing specific OrangePiPCDriver using the guidelines described here https://github.com/dotnet/iot/pull/780

This is the code that I ask to push in the repository

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace System.Device.Gpio.Drivers
{
    /// <summary>
    /// A GPIO driver for the Orange Pi PC.
    /// </summary>
    /// <remarks>
    /// SoC: Allwinner H3
    /// </remarks>
    public class OragePiPCDriver : SunxiDriver
    {
        protected override int GpioRegisterOffset0 => 0x01C20800;
        protected override int GpioRegisterOffset1 => 0x01F02C00;

        /// <summary>
        /// Orange Pi PC has 28 GPIO pins.
        /// </summary>
        protected internal override int PinCount => 28;

        /// <summary>
        /// Converts a board pin number to the driver's logical numbering scheme.
        /// </summary>
        /// <param name="pinNumber">The board pin number to convert.</param>
        /// <returns>The pin number in the driver's logical numbering scheme.</returns>
        protected internal override int ConvertPinNumberToLogicalNumberingScheme(int pinNumber)
        {
            return pinNumber switch
            {
                3 => MapPinNumber('A', 12),
                5 => MapPinNumber('A', 11),
                7 => MapPinNumber('A', 6),
                8 => MapPinNumber('A', 13),
                10 => MapPinNumber('A', 14),
                11 => MapPinNumber('A', 1),
                12 => MapPinNumber('C', 14),
                13 => MapPinNumber('A', 0),
                15 => MapPinNumber('A', 3),
                16 => MapPinNumber('C', 4),
                18 => MapPinNumber('C', 7),
                19 => MapPinNumber('C', 0),
                21 => MapPinNumber('C', 1),
                22 => MapPinNumber('A', 2),
                23 => MapPinNumber('C', 2),
                24 => MapPinNumber('C', 3),
                26 => MapPinNumber('A', 21),
                27 => MapPinNumber('A', 19),
                28 => MapPinNumber('A', 18),
                29 => MapPinNumber('A', 7),
                31 => MapPinNumber('A', 8),
                32 => MapPinNumber('E', 8),
                33 => MapPinNumber('A', 9),
                35 => MapPinNumber('A', 10),
                36 => MapPinNumber('E', 9),
                37 => MapPinNumber('A', 20),
                38 => MapPinNumber('E', 6),
                39 => MapPinNumber('E', 7),
                _ => throw new ArgumentException($"Board (header) pin {pinNumber} is not a GPIO pin on the {GetType().Name} device.", nameof(pinNumber))
            };
        }
    }
}

Thanks in advance, D.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
krwqcommented, Dec 10, 2020

@Ellerbach @joperezr @pgrawehr we should prioritize unblocking this

0reactions
Ellerbachcommented, Jan 21, 2023

Closing as done.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I need a Windows x64 driver for PC+ OTG port - Beginners
I'm having trouble getting an OS to boot from the SD card on the PC ... I need a Windows x64 driver for...
Read more >
Can i build a desktop pc/daily driver pc using the latest ...
I would like to run arch or arch based linux, and would like to use inkscape, gimp, blender, davinci and other multimedia production...
Read more >
How to connect the mcp251x driver on the OrangePI PC?
Hi all, I'm trying to put my orange pi zero to talk with a CAN BUS via mcp2515 chip. The chip is SPI...
Read more >
Orange Pi PC:Armbian_Ubuntu_xenial 16.04_2017 Latest ...
Orange Pi PC :Armbian_Ubuntu_xenial 16.04_2017 Latest Image Download With PreInstalled Wifi Driver(RTL8192). By shivanshTalwar in CircuitsRaspberry Pi. 6,686. 5.
Read more >
View topic - Driver for orangepi PC Plus : rtl8189ftv
Hello, I'm writing this because I need help. My Wi-Fi adapter is not detecting. I installed the driver as it says on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found