User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

New wiringPi released

Mon Dec 12, 2016 3:04 pm

This is version 2.36 (Yes, I know, a jump from the last one, 2.32, but there you go).

Get it via git & self-compile for now (apt-get purge wiringpi first if you have it installed via a package).

It fixes stuff that breaks in kernels 4.8 and onwards. Adds in more little bitty IO things - eg.. reading 1-wire temperature ds18b20 things and some temp/pressure sensors (think; weather station) fixes some potential security issues in the setuid root gpio program and makes user-level gpio access the default, but will fall-back to /dev/mem if that fails (then it will fail hard on you - use sudo)

And other stuff. Enjoy

-Gordon
--
Gordons projects: https://projects.drogon.net/

steven1977
Posts: 89
Joined: Fri Sep 02, 2016 7:39 am

Re: New wiringPi released

Sun Dec 18, 2016 9:16 pm

Thx gordon!
Visit my blog : https://pirobotblog.wordpress.com

ElEscalador
Posts: 681
Joined: Tue Dec 15, 2015 4:55 pm
Location: Detroit, MI USA
Contact: Website

Re: New wiringPi released

Sun Dec 18, 2016 9:44 pm

Yes, much appreciated and much looking forward to when it is set up easy to get/install/upgrade for us simpleton that still need our hands held. Plans to include this version with a future Rasbian release?
My Autonomous Robot Project and a few of my other projects below.

https://lloydbrombach.wordpress.com/

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: New wiringPi released

Sun Dec 18, 2016 10:09 pm

ElEscalador wrote:Yes, much appreciated and much looking forward to when it is set up easy to get/install/upgrade for us simpleton that still need our hands held. Plans to include this version with a future Rasbian release?
I think it already is easy to get/install/upgrade. Two commands to install or upgrade I think it's easy enough. It's all documented here: http://wiringpi.com/download-and-install/

I'll see if I can get it pushed into Raspbian, but I really have no control over that.

But worry not - if you want it simple, I'll be releasing a new version of my RTB BASIC early in the new year.

-Gordon
--
Gordons projects: https://projects.drogon.net/

RaspISteve
Posts: 98
Joined: Wed Oct 24, 2012 9:15 pm
Location: Cheltenham, UK

Re: New wiringPi released

Tue Dec 20, 2016 10:40 pm

Perhaps a question for Gordon,
Sir, started using your WiringPi a year or so back then got distracted. A question I did ask at the time was about what to do when I've done with my WiringPi related application.

My question at the time was about any issues on leaving WiringPi running, certainly with interrupts active seems unnatural to just 'walk away'. During development is there a safe way to detach ISRoutines then re-attached at then next program itteration without confusing the OS.

Similarly if its been running already any problems with a second initialisation.

Is there s simple way to close WiringPi or would a reboot be required.
Share and Enjoy.

User avatar
DougieLawson
Posts: 36322
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: New wiringPi released

Tue Dec 20, 2016 10:48 pm

RaspISteve wrote: Is there s simple way to close WiringPi or would a reboot be required.
Eh? WiringPi is a C/C++ library that gets linked into your program. There's no runtime component.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: New wiringPi released

Tue Dec 20, 2016 10:51 pm

RaspISteve wrote: Is there s simple way to close WiringPi or would a reboot be required.
Everything is closed when your program exits. There is no need for a "close" operation.

-Gordon
--
Gordons projects: https://projects.drogon.net/

RaspISteve
Posts: 98
Joined: Wed Oct 24, 2012 9:15 pm
Location: Cheltenham, UK

Re: New wiringPi released

Wed Dec 21, 2016 11:27 pm

DougieLawson wrote:
RaspISteve wrote: Is there s simple way to close WiringPi or would a reboot be required.
Eh? WiringPi is a C/C++ library that gets linked into your program. There's no runtime component.
[email protected] wrote:
RaspISteve wrote: Is there s simple way to close WiringPi or would a reboot be required.
Everything is closed when your program exits. There is no need for a "close" operation.

-Gordon
Guys, Thanx. Nearest I got to a proper OS was MSDos and TSRs then embedded where I owned everything but always felt the need to tidy up after.
Never like loose ends (they can bite back) hence the question.
Share and Enjoy.

dobova86
Posts: 71
Joined: Wed Dec 05, 2012 5:32 pm

Re: New wiringPi released

Thu Dec 29, 2016 3:55 pm

Hi Gordon,
I get this warnings during build:

Code: Select all

...
GPIO Utility
[Compile] gpio.c
[Compile] readall.c
[Compile] pins.c
gpio.c: In function ‘doI2Cdetect’:
gpio.c:360:30: warning: unused parameter ‘argc’ [-Wunused-parameter]
 static void doI2Cdetect (int argc, char *argv [])
                              ^
gpio.c: In function ‘doExports’:
gpio.c:391:28: warning: unused parameter ‘argc’ [-Wunused-parameter]
 static void doExports (int argc, char *argv [])
                            ^
gpio.c:391:40: warning: unused parameter ‘argv’ [-Wunused-parameter]
 static void doExports (int argc, char *argv [])
                                        ^
gpio.c: In function ‘doReset’:
gpio.c:717:28: warning: unused parameter ‘progName’ [-Wunused-parameter]
 static void doReset (char *progName)
                            ^

At the end I've no gpio utility done...
Probably I have some wrong flag for gcc ?
What's wrong?

EDIT: Sorry, I had some user problem in permission settings on /usr/local/bin dir...

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: New wiringPi released

Fri Dec 30, 2016 4:56 am

dobova86 wrote:Hi Gordon,
I get this warnings during build:
Warnings are not errors.

-Gordon
--
Gordons projects: https://projects.drogon.net/

stevieb9
Posts: 15
Joined: Fri Jan 13, 2017 2:40 pm

Re: New wiringPi released

Fri Jan 13, 2017 2:48 pm

Thanks Gordon!

On the website, you state: "Fixed the spurious first interrupt issue with the “ISR” code...". Can you expand on that?

I'm curious to know whether it fixes an issue I had while wrapping wiringPi for use with Perl. Here's the XS code with comments that describe the issue I was having, and the workaround:

Code: Select all

char *perl_callback; 
PerlInterpreter *mine;
int first_call = 1;

void interruptHandler(){
    PERL_SET_CONTEXT(mine);
 
    dSP;
    ENTER;
    SAVETMPS;
    PUSHMARK(SP);
    PUTBACK;
 
    // for some reason, the very first interrupt always calls the handler
    // twice. This code skips the very first erroneous call
 
    if (first_call == 0){
        call_pv(perl_callback, G_DISCARD|G_NOARGS);
    }
    else
        first_call = 0;
 
    FREETMPS;
    LEAVE;
}
Is this the issue you mentioned, or was there another one I may not have been aware of?

For completeness, the code referenced is from my [url https://metacpan.org/pod/release/STEVEB ... gPi/API.pm]WiringPi::API[/url] Perl distribution.

Keep up the great work!

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: New wiringPi released

Fri Jan 13, 2017 7:37 pm

stevieb9 wrote:Thanks Gordon!

On the website, you state: "Fixed the spurious first interrupt issue with the “ISR” code...". Can you expand on that?
I fixed the spurious first interrupt issue with the “ISR” code.. not sure what more I can say, really. There was an issue whereby when you used the ISR code, you got a spurious interrupt - just once. I fixed it.
I'm curious to know whether it fixes an issue I had while wrapping wiringPi for use with Perl. Here's the XS code with comments that describe the issue I was having, and the workaround:
Why not test it and see... I don't do perl anymore.

-Gordon
--
Gordons projects: https://projects.drogon.net/

Return to “C/C++”