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

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
Author: linga51

GPIO library - WiringPi

[Copy link]

2

Threads

19

Posts

110

Credits

Registered member

Rank: 2

Credits
110
Post time 2016-2-22 18:14:22 From the mobile phone | Show all posts
when i compile RFSniffer with pin 16 (physical pin 40) then it falls back to gpio in sysfs mode. what pin did you use to test it?

2

Threads

19

Posts

110

Credits

Registered member

Rank: 2

Credits
110
Post time 2016-2-23 16:44:56 From the mobile phone | Show all posts
Edited by apocalyps at 2016-2-25 03:47

Did some testing but on some pins it falls back to sysfs.

Edit:
@Werecatf
Tried your code but also got the following message

  1. gpio: Unable to open GPIO export interface: No such file or directory
  2. wiringPiISR: unable to open /sys/class/gpio/gpio199/value: No such file or directory
Copy the Code

EDIT:

Ok i had some things not correctly in my kernel.

1

Threads

15

Posts

103

Credits

Registered member

Rank: 2

Credits
103
Post time 2016-2-26 17:47:04 | Show all posts
@apocalyps

What was the problem with the kernel?
I have the same problem

2

Threads

144

Posts

871

Credits

Senior member

Rank: 4

Credits
871
Post time 2016-2-26 17:50:14 | Show all posts
His kernel was not built with the GPIO sysfs-interface enabled, he had to enable the setting and re-build the kernel.

0

Threads

6

Posts

114

Credits

Registered member

Rank: 2

Credits
114
Post time 2016-2-26 18:44:57 From the mobile phone | Show all posts
WereCatf, please can you give us some info on how rebuilt the kernel with sysfs interface enabled?

2

Threads

144

Posts

871

Credits

Senior member

Rank: 4

Credits
871
Post time 2016-2-26 19:46:10 | Show all posts
domcat replied at 2016-2-26 18:44
WereCatf, please can you give us some info on how rebuilt the kernel with sysfs interface enabled?

When doing menuconfig the appropriate setting can be found under Device Drivers -> GPIO Support -> sysfs interface, or use CONFIG_GPIO_SYSFS=y if manually editing .config.

If you meant you don't even know how to build a kernel in general: no, that's not something a beginner should be doing in the first place and I don't want to write such a long guide -- way too much work. Use an image where it's already enabled by default instead, like e.g. Armbian.

1

Threads

15

Posts

103

Credits

Registered member

Rank: 2

Credits
103
Post time 2016-2-26 20:02:04 | Show all posts
@WereCatf
Thanks for the explanation!

You can tell which ports function works wiringPiISR.
I have seen the information that it only works on ports PA7, PA8, PA9, PPA10, PG6, PG8
example here https://github.com/ua3nbw/gpiokey/blob/master/wpi.c

2

Threads

144

Posts

871

Credits

Senior member

Rank: 4

Credits
871
Post time 2016-2-26 20:07:56 | Show all posts
All PA- and PG-pins should be able to work with interrupts, at least according to the H3 - specsheet.

1

Threads

15

Posts

103

Credits

Registered member

Rank: 2

Credits
103
Post time 2016-2-26 21:05:58 | Show all posts
@WereCatf
Thanks you!

0

Threads

6

Posts

114

Credits

Registered member

Rank: 2

Credits
114
Post time 2016-2-26 22:00:32 From the mobile phone | Show all posts
Ok thanks.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

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

2019-12-12 22:59 GMT+8 , Processed in 0.031062 second(s), 20 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list