View: 62361|Reply: 14

WiringOP a GPIO library for Oangepi PC/ Plus is released for testing.

[Copy link]

18

threads

303

posts

9939

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9939
Published in 2015-10-30 11:43:13 | Show all floors |Read mode
Edited by jacer at 2015-11-1 22:09

Here is a porting of WiringPi for Orange Pi PC, OPI-PLUS, OPI2. Please download and test. If you find any bug, please report via email or just post here.Credict goes to Zhaolei or sauberpauli.
WiringOP, a GPIO library for H3 based OPI-PC, OPI-PLUS

2

threads

19

posts

110

credits

Registered member

Rank: 2

credits
110
Published in 2016-1-22 17:12:09 | Show all floors
In the software posted the following is part of wiringPi.c but with orangePi the gpio module will create a path  "sys/class/gpio_sw" in sysfs. Is this just a simple fix in the path or will this be more complicated?

if (sysFds [bcmGpioPin] == -1)
  {
    sprintf (fName, "/sys/class/gpio/gpio%d/value", bcmGpioPin) ;
    if ((sysFds [bcmGpioPin] = open (fName, O_RDWR)) < 0)
      return wiringPiFailure (WPI_FATAL, "wiringPiISR: unable to open %s: %s\n", fName, strerror (errno)) ;
  }

0

threads

12

posts

132

credits

Registered member

Rank: 2

credits
132
Published in 2015-10-30 17:08:12 | Show all floors
Edited by sauberpauli at 2015-10-30 23:09

A small reference to me would have been nice


Adaptation to H3 orange pi was made by me.


Next Time please

5

threads

354

posts

2742

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2742
Published in 2015-10-30 22:06:56 | Show all floors
Edited by fritz at 2015-10-30 15:42

Yeah, that's not nice!

@jacer if you are @zhaolei fix this!
If not:
@sauberpauli if you want I can fork this thing and put the reference/credit to you or I can help you if you want to fork it yourself.
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

18

threads

303

posts

9939

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9939
 Author| Published in 2015-10-30 23:06:48 from mobile | Show all floors
sauberpauli replied at 2015-10-30 17:08
A small reference to me would have been nice

Adaptation to H3 orange pi was made by me.


I don't take credit for this. I provided the original github source which contains the author's email. If the author is you, then kudos goes to you.

18

threads

303

posts

9939

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9939
 Author| Published in 2015-10-30 23:09:46 from mobile | Show all floors
Zhaolei is the author. I asked his permission to post here.

0

threads

12

posts

132

credits

Registered member

Rank: 2

credits
132
Published in 2015-10-30 23:13:48 | Show all floors
Edited by sauberpauli at 2015-10-30 23:16
jacer replied at 2015-10-30 23:06
I don't take credit for this. I provided the original github source which contains the author's e ...

The orginal Source-Code was posted here ...

http://www.orangepi.org/orangepi ... =148&page=5#pid4297

[size=13.63636302948px][size=13.63636302948px][size=13.63636302948px][size=13.63636302948px]
I have adapted the wiringpi library (http://wiringpi.com/) to the Orange Pi PC.
Basis was the adaptation of https://github.com/LeMaker/WiringBP "banana pi pro" library.

Changes  ...
1. CPU from A20 to H3
2. Header Pinout
3. /dev/i2c device
4. gpio utility

0

threads

12

posts

132

credits

Registered member

Rank: 2

credits
132
Published in 2015-10-31 00:57:41 | Show all floors
fritz replied at 2015-10-30 22:06
Yeah, that's not nice!

@jacer if you are @zhaolei fix this!

Thank you fritz

1

threads

3

posts

27

credits

Novice

Rank: 1

credits
27
Published in 2015-11-4 17:56:23 | Show all floors
Thanks @sauberpauli very nice work.

I'have a problem with ISR using Debian, i load the gpio module with the following command:

  1. modprobe gpio-sunxi
Copy code


and the GPIO device files are not /sys/class/gpio but /sys/class/gpio_sw/

How can I use the ISR with my orange pi PC with Debian and correct the gpio code?

Thanks,
Francesco


0

threads

12

posts

132

credits

Registered member

Rank: 2

credits
132
Published in 2015-11-6 04:31:29 | Show all floors
lupin982 replied at 2015-11-4 17:56
Thanks @sauberpauli very nice work.

I'have a problem with ISR using Debian, i load the gpio module  ...

ISR is is not possible with the module gpio-sunxi.

Look at
OrangePI-Kernel/linux-3.4/drivers/gpio/gpio-sunxi.c ...
that is the Source Code of the Kernel-Module. The gpio-sunxi kernel source code requires an adjustment to interrupt handling.
This is actually not done for the Allwinner H3


0

threads

1

posts

6

credits

Novice

Rank: 1

credits
6
Published in 2015-11-30 00:24:58 | Show all floors
Hello, I am using Loboris Debian XFCE img that works stable on my Orange PI Plus.
Sorry for my English. I am Russian user.

I can not connect and use a 433 MHz transmitter and receiver.
I wiringOP use the lib. (git,make install)
connect to pin 1 and another. (5v,gnd,wpi 1-0)
433Utils used.
heard that WiringOP no interrupts.
tell me how to use the 433 MHz and run?
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list