Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
12Next
Return to list New
View: 49426|Reply: 14

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

[Copy link]

18

Threads

303

Posts

7753

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
7753
Post time 2015-10-30 11:43:13 | Show all posts |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
Post time 2016-1-22 17:12:09 | Show all posts
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
Post time 2015-10-30 17:08:12 | Show all posts
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

355

Posts

2102

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2102
Post time 2015-10-30 22:06:56 | Show all posts
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

7753

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
7753
 Author| Post time 2015-10-30 23:06:48 From the mobile phone | Show all posts
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

7753

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
7753
 Author| Post time 2015-10-30 23:09:46 From the mobile phone | Show all posts
Zhaolei is the author. I asked his permission to post here.

0

Threads

12

Posts

132

Credits

Registered member

Rank: 2

Credits
132
Post time 2015-10-30 23:13:48 | Show all posts
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
Post time 2015-10-31 00:57:41 | Show all posts
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
Post time 2015-11-4 17:56:23 | Show all posts
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 the 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
Post time 2015-11-6 04:31:29 | Show all posts
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
Post time 2015-11-30 00:24:58 | Show all posts
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?
12Next
Return to list New
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-12-7 05:10 GMT+8 , Processed in 0.037051 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list