jacer post at 2015-10-30 11:43:13

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

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

apocalyps post at 2016-1-22 17:12:09

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

sauberpauli post at 2015-10-30 17:08:12

Edited by sauberpauli at 2015-10-30 23:09

A small reference to me would have been nice :o


Adaptation to H3 orange pi was made by me.


Next Time please :)

fritz post at 2015-10-30 22:06:56

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.

jacer post at 2015-10-30 23:06:48

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.

jacer post at 2015-10-30 23:09:46

Zhaolei is the author. I asked his permission to post here.

sauberpauli post at 2015-10-30 23:13:48

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


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

sauberpauli post at 2015-10-31 00:57:41

fritz replied at 2015-10-30 22:06
Yeah, that's not nice!

@jacer if you are @zhaolei fix this!


Thank you fritz :)

lupin982 post at 2015-11-4 17:56:23

Thanks @sauberpauli very nice work.

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

modprobe gpio-sunxi

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


sauberpauli post at 2015-11-6 04:31:29

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 :(


zenoize post at 2015-11-30 00:24:58

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?
page: [1] 2
View full version: WiringOP a GPIO library for Oangepi PC/ Plus is released for testing.