WiringOP a GPIO library for Oangepi PC/ Plus is released for testing.
Edited by jacer at 2015-11-1 22:09Here 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
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)) ;
} 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 :)
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.
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. Zhaolei is the author. I asked his permission to post here. 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
fritz replied at 2015-10-30 22:06
Yeah, that's not nice!
@jacer if you are @zhaolei fix this!
Thank you fritz :)
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
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 :(
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